Ch 3 Questions #5

 

For Loops

 

 

 

 

1.         What is the difference between a for loop and a while loop?

 

2.         Write an example of a for loop?

 

3.         Write an example of a for loop that is infinite

 

4.         Write a code fragment that generates the cube roots for the integers between 1000 and 5.

 

5.         Is it possible to increment something by x squared? Explain