Hi guys: Can any one please tell me what i make mistake as it prints the table only first time also it dont terminate the loop when i press the minus sign. Thanks.
#include <iostream>
using namespace std;
int main()
{
int multiplicand = 0;
int product = 0;
int multiplier = 0;
cout << "Multiplicand (negative number to end):";
cin >> multiplicand;
do
{
do
{
multiplier +=1;
product = multiplicand * multiplier;
cout << multiplicand << " * " << multiplier << " = " << product << endl;
} while(multiplier < 10);
cout << endl ;
cout << "Multiplicand (negative number to end) :";
cin >> multiplicand;
} while(multiplicand >=0);
cout << endl;
cout << "Multiplicand (negtative number to end):";
cin >> multiplicand;
system("Pause");
return 0;
}
Open in new window