Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

#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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

When is it appropriate to show grace toward others?

Answered: 1 week ago