The assignment says "Write a program that asks the user to type in numbers. After each entry, the program should report the cumulative sum of the entries to date. The program should terminate when the user enters 0."
I have partly been succesfull I guess. But I dont know how to make the program so it doesnt quit when I press the first number. And for it to actually quit when I press 0.. I hope a friendly soul can help me out.
#include <iostream>
using namespace std;
int main()
{
int numbers = 0;
cout << "Enter numbers: ";
cin >> numbers;
for (int i=0; i<100;i=i+numbers){
cout << i;
}
cin.get();
cin.get();
return 0;
}