Take a number from user and make a multiplication table of that number till 10
using do while loop.
#include<iostream>
using namespace std;
void Compute_table(int n)
{
int i=1;
do
{
cout<<"\n"<<n<<" X "<<i<<" = "<<n*i;
i++;
}
while(i<=10);
}
int main()
{
int n;
cout<<"Enter a number : ";
cin>>n;
Compute_table(n);
}
Comments
Leave a comment