int main()
{
cout << "This Program was written by Nehal Shah\n" << endl;
int num, total;
cout << "Please enter an integer number:\t\t\t";
cin >> num;
while ( num < 0 )
{
cout << "\t********************************\n";
cout << "\t********** ERROR *************\n";
cout << "\t********************************\n";
cout << " --------------------------------------\n";
cout << " Only input a positive integer number\n";
cout << " --------------------------------------\n\n";
cout << "Please enter the number again:\t\t\t";
cin >> num;
}
for (int total = num; total <= num; num++)
cout << "The sum of all number from 1 up to " << num << " is:\t";
cout << (num+ num) << endl;
system("PAUSE");
return 0;
}
i get the error on the total.. any ideas on how i could fix this? thanks..