[
# include <iostream>
using namespace std;
int main()
{
int num3;
int num1;
int num2;
cout <<" Enter a positive number and i will add it to your last number.." << endl << endl;
cout << "Enter a number " << endl << endl;
cin >> num1,num2;
cout << " Enter another number " << endl << endl;
cin >> num2;
while (num1 || num2 < 0 )
{
cout << "You entered a negative number..Goodbye!!" << endl;
return 0;
}
cout << " the sum of your numbers is " << num1 + num2 << endl << endl;
cout << "enter one more number "<< endl << endl;
cin num3;
cout << " your new total is " num3 + num2 + num3 << endl;
}
while (num1 || num2 < 0 )
{
cout << "You entered a negative number..Goodbye!!" << endl;
return 0;
}
}
]
This post has been edited by jimblumberg: 13 October 2012 - 05:32 AM
Reason for edit:: Added missing Code Tags, Please learn to use them.

New Topic/Question
Reply




MultiQuote





|