Wednesday 9 May 2012

Lecture: 62


                                                Lecture 62

// Loop For
#include <iostream>
#include <conio.h>
using namespace std;
 main ()
{  
    int n,tnum;
    cout<<"Enter the table number: ";
    cin>>tnum;
    for(n=1;n<11;n++)
    {
      cout<<"\n"<<tnum<<" X "<<n<<" = "<<tnum*n;
    }
  getch();
  return 0;
}

Code view in dev compiler:

Compile the program Ctrl+F9

      Run program Ctrl+F10