Welcome

Hi! This blog is for beginners of c++ and java .You can check and pick codes for your programming assignments. This will also help you to understand the concepts of these programming languages. Its all about programming.

Loops Practise(Table with FOR LOOP)

Wednesday, May 18, 2011

#include <iostream.h>
#include <conio.h>
int main ()
{
    clrscr();
    long int a=0;
    long int b=0;
    cout <<"Enter The Number For Table : ";
    cin >> a;
    cout <<"Enter Table Length : ";
    cin >> b;
    int x=1;
    for (int n=x;n<=b;n++)
    {
        cout << a <<"  x  " << n <<" = " << a*n;
        cout <<endl;
    }
    getch();
    return 0;

    }