Write a program to print table using do-while loop.

#include<iostream>

using namespace std;

int main()

{

int a;

int i=1;

cout<<"enter the number to print table: ";

cin>>a;

do

{

cout<<a<<" * "<<i<<" = "<<a*i<<endl;

i++;

}

while(i<=10);

}


Output:

Write a program to print table using do-while loop.

Post a Comment

Please do not enter any spam link in the comment box.

Previous Post Next Post