HW15
COP-3223H
Take the following program:
int i = 1; while (i < 10) { printf("%d\n", i); i = i + 1; }Using only your mind and/or pencil and paper (do not compile and run the program, what will be the output of running this program? How many times will
printfbe called in this program?Take the following program:
int i = 0; int sum = 0; while (i < 10) { int j = 0; while (j < 5) { j = j + 1; sum = sum + 2; } i = i + 1; } printf("%d\n", sum);Using only your mind and/or pencil and paper (do not compile and run the program, what will be the output of this program? How many times does each while loop run?
Enter your answers into webcourses.