Problem 4. Write a C program, called integer-sum.c that computes the sum of inte
ID: 3789633 • Letter: P
Question
Problem 4. Write a C program, called integer-sum.c that computes the sum of integers interactively provided by the user. 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: l. Entering a new integer 2. Printing the sum of all the integers entered so far 3. Exiting the program If the user enters a number other than 1, 2, or 3 when presented with this menu, the program should simply print the same menu again, prompting the user to enter a new choice of action. You are not re- quired to introduce the constants 1, 2, and 3 into the program using #define, although you can do so. You can assume that when the user is prompted to enter an integer, the user indeed enters an integer. Here is one sample run of such a program, assuming that the executable file is called integer sum. Note that the input from the user is marked as underlined text below.Explanation / Answer
Code :
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.