Answered step by step
Verified Expert Solution
Link Copied!

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!

image text in transcribed

#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

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

Brief the importance of span of control and its concepts.

Answered: 1 week ago

Question

What is meant by decentralisation?

Answered: 1 week ago

Question

Write down the Limitation of Beer - Lamberts law?

Answered: 1 week ago

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago

Question

9. Power and politics can be destructive forces in organizations.

Answered: 1 week ago