0

I am confused on conditionals and loops

a lot of the vocab there using to describe diffrent actions and functions are not explained so when they keep on using those vocab i dont understand it

4th Dec 2017, 1:33 PM
RyGuy
5 Réponses
+ 1
That section has a lot of different things, if statements, while loops, for loops, do while loops, switch statements... what part do you need help with?
4th Dec 2017, 1:53 PM
Mooaholic
Mooaholic - avatar
+ 1
ya it takes some studying, the While loop is easy that is just like an if statement with the brackets and 1 condition inside the () the for loop is a little trickier with what's inside the () but the brackets are the same atleast just try to remember inside a for loop is for(start a variable(int i=0) then a ;(or if you don't have a variable to start just a ;) then your condition like an if statement has(i < 5) and that with a ; and last is what to increase the amount by(i++ ) and then close your ). switch statements you can remember the brackets are just like all the others aswell but after that inside you {} you need case 1: and this is the time you use : and not ; for each case. but mainly it all comes down to trying to remember them. if you want I can write up a code later that has 1 of each of the loops and stuff with comments to help you look at to study.
4th Dec 2017, 5:06 PM
Mooaholic
Mooaholic - avatar
+ 1
still working on it some but here it is so far. https://code.sololearn.com/cITviCar8tKz/?ref=app
5th Dec 2017, 6:44 PM
Mooaholic
Mooaholic - avatar
0
all loops and switch statements if statements were easy but i try to write some code but i cant memerize it all diferent parenthesis semi colons and diffrent symbols where you use them and where you put them i feel the questons go by too fast i answer the questions correctly but i cant use it
4th Dec 2017, 3:48 PM
RyGuy
0
that be great
5th Dec 2017, 2:14 PM
RyGuy