c++ response john

jrsmith91

simply respond to classmates post with 150 words


In C++ there are 3 loops that can be used up-to this point that I have learned about. We have the "for loop", the for loop is used when you need to loop from one variable to another and increase it by a specific number/value. This is mostly used to numeric increments that I have found I personally use. Then we have the "while loop", this loop is used when you are not sure how many time you may need the program to run it. This type of loop can be very beneficial because it will test the condition before it will execute the loop. The last type is the  "do loop", this loop will run after you tell the program to "do" something. It will always run at least once since it has to "do something" in order to run it. 

    • 9 years ago
    • 3
    Answer(0)