Monday 22 April 2013

Programm to get multiplication table

Description:

This program take a number as input and make its multiplication table automatically.

Code:


#include<iostream>
#include<conio.h>
#include<iomanip>
#include<math.h>
using namespace std;
int main()
{
    int i,n=1,p;
    xy:
    cout<<"Enter the number to get its multiplication table"<<endl;
    cin>>n;
    cout<<endl;
    i=1;
    while(i<=10)
    {p=n*i;
     cout<<n<<"*"<<i<<"="<<p<<endl;
     i++;
     }
     goto xy;
     getche();
     return 0;
     }


Output:


No comments:

Post a Comment