Question: I am trying to get the program to exit if the user inputs 'q'. I have no idea how to do something to make that

I am trying to get the program to exit if the user inputs 'q'. I have no idea how to do something to make that while affect the rest of the program. Using the code below , make a slight modification so that the buffer is cleared and control returns to the menu system.

I am trying to get the program to exit if the user

#include void summing(void) i long num; long sumOL; int status char ci printf("Please enter an integer to be "summed (q to quit): "); status - scanf("%ld", while(status) &num); sum = sum + num; printf( "Enter next number (q to quit):" status-scanf ("%ld", &num); while(c = getchar ( ) != EOF && c !- ' ') printf ("The sum is % ld", sum)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!