Friday 11 May 2012

Lecture: 63


                                                Lecture 63

// Loop For
#include <iostream>
#include <conio.h>
using namespace std;
 main ()
{  
    int n,tnum,st,ed;
    cout<<"Enter the table number: ";
    cin>>tnum;
    cout<<"Enter the start table number: ";
    cin>>st;
    cout<<"Enter the end table number: ";
    cin>>ed;
    for(n=st;n<=ed;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