# include <stdio.h> int main() ( int number, sum, choice, total_numbers; printf(
ID: 3584761 • Letter: #
Question
# include <stdio.h>
int main()
(
int number, sum, choice, total_numbers;
printf("Welcome to the integer sum program! ");
choice = 0; total numbers = 0; sum = 0;
while (choice != 3)
{
printf("Please enter your choice: ");
scanf("%i", &choice);
if (scanf("%i", &choice)= 1)
printf ("Enter a new integer");
scanf("%i", &number);
else if ( scanf("%i", &choice) = 2)
sum = sum + number ;
else
total_numbers = choice
printf ("So far, You have entered %i numbers", total_numbers);
printf("You may: 1. Enter a new integer 2. Display the current sum 3. Exit ");
}
return 0 ;
}
Information:
At each iteration, the program should print the number of integers that the user has entered
so far, along with a menu describing three possible actions from which the user could choose. The three
possible actions are as follows:
1. Entering a new integer
2. Printing the sum of all the integers entered so far
3. Exiting the program