[Solved] For loop? For why and for how [closed]


When creating a loop, you must put a loop control variable. In this case it is char. You declare it when you are making your for loop. You can change that to whatever you want. I usually put “I”.

The count +=1 isn’t necessary for a loop to work, this is only adding 1 every time your if statement is true. At the end it will print your count, letting you know how many times your if statement saw true

1

solved For loop? For why and for how [closed]