Write a program to print table using for loop.

#include<iostream>

using namespace std;

int main()

{

int a;

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

cin>>a;

for(int i=1;i<=10;i++)

{

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

}

}


Output:

Write a program to print table using for loop.

Post a Comment

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

Previous Post Next Post