/* File: gym3.c Demonstrating nested loops Added outer loop to step through 7 days of a week. */ #include int main() { int i, j, day ; printf("This week I go to the gym\n") ; day = 1 ; while (day <= 7) { printf("\n") ; printf("On Day %d I go to the gym.\n", day) ; i = 1 ; printf(" Sit up:") ; while(i <= 10) { printf(" #%d", i) ; i = i + 1 ; } printf("\n") ; j = 1 ; printf(" Push up:") ; while(j <= 10) { printf(" #%d", j) ; j = j + 1 ; } printf("\n") ; day = day + 1 ; } return 0 ; }