Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this program, you are supposed to figure out the code for terminating the program using the code below. Make a slight modifcation so that
In this program, you are supposed to figure out the code for terminating the program using the code below. Make a slight modifcation so that the buffer is cleared and control returns to the menu system. I have the main, which is too long. If you want it, I can attach it. Thanks for your help!
#include void summing (void) long num; long sum = 0L; int status; char c: 10printf("Please enter an integer to be summed ": 11printf (" (q to quit): ") 12 13 status = 3canf("%ld", while (status =-1) &num) ; 15 16 17 18 19, | 20 | | 21 sum = sum + num; printf ("Please enter next integer (g to quit):"); status = 3canf("%ld", &num); printf ("Those integers sum to %ld . ", while ( (c = getchar ( ) != EOF != ' ' ) ) 3um); Output Pau_extra_credit (Build, Run) Pau_extra_credit (Run) * 9Exit Please select number and press enter Please enter an integer to be summed q to quit) 2 Please enter next integer (q to quit): 3 Please enter next integer (q to quit): q Those integers sum to 5 12 231 Pau_extra_credit (Run)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started