Quote:I think so far it is working good
Well ... not in terms of actually looping ... or even compiling ...
In order to loop, you need to use a
. This executes at least once, and tests at the end to see if it should go round again.
. This executes zero or more times, testing at the beginning of each loop to see if it should execute the loop body or not.
. This executes a number of times, and allows you to change the value after each time around.
You will find details on how to use them here:
do...while loop in C - Tutorialspoint
while loop in C - Tutorialspoint
for loop in C - Tutorialspoint
As a beginner, you should use these constructs only
to make your code loop!