1. When should you use a for statement instead of a while statement? When should you use a while statement instead of a for statement?
2. What is the difference between a do statement and a while statement?
3. In the following code, label the four steps of a typical loop:
int count = 0;
for (int tracker = 0; tracker <>
count++;
4. Given a positive integer n in the variable number, write a for statement that computes the sum of the consecutive
integers 1 + 2 + ... + n.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here