C++ Program for Printing Table of Entered Number

#include<iostream>

#include<iomanip>

using namespace std;int main()

{

int i=1,n=1,p=0;

cout<<"Printing table of N: ";

cin>>n;

i=1;

while(i<=10)

{

cout<<setw(2)<<n<<" x "<<setw(2)<<i<<" = "

    <<setw(4)<<n*i<<endl;

i++;

}

}

Comments