How can I enter Mongo as a superuser or reset users?

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

Was this solution helpful to you?

Find solution

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.