Search Your Query

Custom Search

Tuesday, 24 May 2011

Simple Mathematical Table Output Program


#include <iostream.h>

void main()
{
    int a;
    cout << "Tables" << endl;
    cout << endl;
    cout << "Enter any number whose table do you want:";
    cin >> a;
    cout << endl;
    cout << "Table of " << a << " is: " << endl;

    cout << endl;

    cout << a << " * 1 = " << a*1 << endl;
    cout << a << " * 2 = " << a*2 << endl;
    cout << a << " * 3 = " << a*3 << endl;
    cout << a << " * 4 = " << a*4 << endl;        
    cout << a << " * 5 = " << a*5 << endl;
    cout << a << " * 6 = " << a*6 << endl;
    cout << a << " * 7 = " << a*7 << endl;
    cout << a << " * 8 = " << a*8 << endl;
    cout << a << " * 9 = " << a*9 << endl;
    cout << a << " * 10= " << a*10 << endl;
    cout << endl;
}

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...