/* Program to print tables in the following FORMAT
Input: 4
4 x 1 = 4
4 x 2 = 8
4 x 3 = 12
4 x 4 = 16
4 x 5 = 20
4 x 6 = 24
4 x 7 = 28
4 x 8 = 32
4 x 9 = 36
4 x 10 = 40
*/
#include<iostream>
using namespace std;
int main()
{
int n,i;
cout<<"Enter a Number";
cin>>n;
for(i=1;i<=10;i++)
cout<<n<<" x "<<i<<" = "<<(i*n)<<endl;
}
No comments:
Post a Comment