Table with while 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";
while( i<=b )
{
cout<<"\t\t"<<a<<" * "<<i<<" = "<< i * a <<"\n";
i++;
}
return 0;
}
No comments:
Post a Comment
thnx for visiting my blog