Course C Initial 17th - Loop FOR Part 2
Now, I have others notes about loop for. This command can be used like while, but it structure is different because the loop for use ‘;’. Below, see the basic structure of For command. Between ‘;’, you put a condition and so, the command will work like a loop while. So, it works with this: a variable; a condition; a increment or decrement. The command FOR is a good tool that will be used many times. But if you ask to me: What’s the difference between this command and the command do while or while? My answer is that the command for is universal, but do-while is a special case that in others languages, there’s not, python is an example. FOR works with conditions too, but it allow to us, work with a limited possibility. Look at this image: The image give us it explanation. But I have a note: the last value of a is 11, but 11 isn’t large than 10, that’s the reason of the code stop. Below, see it being ran. The ...