#include<iostream>
usingnamespace std;
int main()
{
int data;
cout<<"Enter 0 to stop entering data and display product";
cout << endl;
while (data !=0)
{
cout << "Enter data:";
cin >> data;
}
system("pause");
return 0;
}
Second, if you need a sum, make a total int total=0; (the '=0' sets it to 0)
and add data to it like so: total+=data;ortotal=total+data; (comes to the same)
I'll let you figure out where to put the snippets, good luck!