multiplication table
#include<iostream>
using namespace std;
int main()
{
int n;
cout<<"Enter the number for which you want the table to be displayed: ";
cin>>n;
cout<<"Table of "<<n<<":"<<endl;
for(int i=0;i<10;i++)
{
cout<<n<<" X "<<(i+1)<<" = "<<(n*(i+1))<<endl;
}
return 0;
}
Comments
Post a Comment