c++

DONEEEE
Last edited on
First of all, please use code tags like so:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<iostream>
using namespace 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; or total=total+data; (comes to the same)
I'll let you figure out where to put the snippets, good luck!
I've figured that one out now I need help with new one.
Post it man, you gotta post it.
I've edited my first post
ASKALSKAS
Last edited on
Topic archived. No new replies allowed.