Navigation Bar

Programe read input and print its table up to giver limit



#include<conio.h>
#include<iostream.h>
void main()
{
clrscr();
long n, l, i;
cout<<"Enter the Number: ";
cin>>n;
cout<<"Enter limit: ";
cin>>l;
for (i=1;i<=l;i++)
{
cout<<n<<"*"<<i<<"="<<n*i<<endl;
}
getch();
}

Output


Enter the Number: 7
Enter limit: 4
7*1=7
7*2=14
7*3=21
7*4=27

No comments:

Post a Comment