Table with for loop
#include<iostream>
using namespace std;
int main()
{
int i=1,a,b;
cout<<"enter the number of table : ";
cin>>a;
cout<<"enter the lenght :";
cin>>b;
cout<<"\n";
for ( i = 1 ; i <= b ; i++ )
{
cout<<"\t\t"<<a<<" * "<<i<<" = "<< i * a <<"\n";
}
return 0;
}
No comments:
Post a Comment
thnx for visiting my blog