Write a program to enter the numbers till the users wants and at the end it should display the sum of the nos.?
-
Output: Enter a number: 6 Do you want to enter another number? (Y/N): Y Enter a number: -3 Do you want to enter another number? (Y/N): Y Enter a number: 0 Do you want to enter another number? (Y/N): Y Enter a number: 2 Do you want to enter another number? (Y/N): N sum: 5 positive: 2 negative: 1 zero:1
-
Answer:
I am assuming you are using C++.? If you want the user to decide whether to keep inputting data then you need to use a do-while loop.
Ivy at Yahoo! Answers Visit the source
Related Q & A:
- How do you pause a program until a button is pressed in JAVA?Best solution by Stack Overflow
- How to write a program to monitor the temperature of CPU?Best solution by Stack Overflow
- Is it possible for a person to enter full REM dream sleep within minutes of falling asleep?Best solution by Quora
- How long should I give a prof to write a letter of recommendation for a graduate school application?Best solution by Yahoo! Answers
- How to write a TV program proposal?
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.