Hah!
As title say.
First i made a basic with x + y
Then i improved it by adding 6 numbers
After that i tried to make a (Negative number) Worked:D
Then i added so it shows the sum everytime you've added new numbers.
PHP Code:#include <iostream>
int main() {
int x;
int y;
int z;
int a;
int b;
int w;
using namespace std;
cout << " This counter is made by Charlie & The first 5 numebers are posetive addition and the last is negative. Enjoy! \n \n \n ";
cout << " Enter a number: ";
cin >> x;
cout << " \n The current sum is: " << x <<endl;
cout << " Enter a second number: ";
cin >> y;
cout << " \n The current sum is: " << x + y <<endl;
cout << " Enter a third number: ";
cin >> z;
cout << " \n The current sum is: " << x + y + z <<endl;
cout << " Enter a fourth number: ";
cin >> a;
cout << " \n The current sum is: " << x + y + z + a <<endl;
cout << " Enter a fifth number: ";
cin >> b;
cout << " \n The current sum is: " << x + y + z + a + b<<endl;
cout << " Enter a last negative number: ";
cin >> w;
cout << " \n The current sum is: " << x + y + z + a + b - w<<endl;
cout << " The sum of all these numbers togheter is: " << x + y + z + a + b - w <<endl;
cin.get();
cin.ignore();
return 0;
}



Reply With Quote![[C++] My first Program with no tut ;d](http://ragezone.com/hyper728.png)


