1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
int num_bananas = 5; // Declare where you initialize.
while(num_bananas > 0) {
num_bananas -= 1;
printf("I have %d bananas.\n", num_bananas);
}
int num_cherries = 5; // Declare where you initialize.
while(num_cherries > 0) {
num_cherries -= 1;
printf("Yum!\nCHERRY!\n");
printf("I have %d cherries.\n", num_cherries);
}
return EXIT_SUCCESS;
}
|
© Copyright 2023 Alexander J. Quinn This content is protected and may not be shared, uploaded, or distributed.