Saturday, 5 October 2013

c++ Counting Table in which u set limit where to count

#include <iostream>

using namespace std;
int main () {
    int x,a,m;
    cout<<"number for the table to count"<<endl; cin>>a;
    cout<<"pleas enter the limit for upto table to print"<<endl;
    cin>>m;
    for(int i =1;i<=m;i++)
    {
        cout<<a<<" X "<<i<<" = "<<a*i<<endl;
    }
    cout<<endl<<"XXXXXXXXXXXXXXXXXX"<<endl;
}