Question: In C programming language; I have the code right but i can't figure out how to make the program continue running instead of ending after

In C programming language;

I have the code right but i can't figure out how to make the program continue running instead of ending after each integer. I need it to run until the sentinel value of -1 is entered to terminate the program. In C programming language; I have the code right but i can't

Write a program that takes multiple integers from the user and, for each integer, computes the sum of the numbers between 0 and that integer. For example, if the user enters 5, the program computes (1+2+3+4-5-15). If the user enters a negative number, the program displays an error message and prompts for a new number. The sentinel value of-1 is used to terminate the program. Enter -1 to terminate Integer: 5 The sum of integers less than or equal to 5 is 15 Integer: 100 The sum of integers less than or equal to 100 is 5050 Integer: -9 Invalid input! Integer: -1 Exiting the program

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!