Program to create a multiplication table of a given number using while loop.
Using Visual Studio 2015
===============================================================
#include<iostream>using namespace std;
#include<conio.h>
void main()
{
int num , value, mul;
cout<<"enter the number=";
cin>>num;
cout << "Multiplication Table for " << num << " :- " << endl;
mul = 1;
while (mul <= 10)
{
value = num * mul;
cout << num << " * " << mul << " = " << value << endl;
mul++;
}
_getche();
}
Comments
Post a Comment