Pages

Wednesday, 10 September 2014

program to Making a multiplication table using for loop .......



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