Lecture 91
// Loop while
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int n,tnum;
cout<<"Enter the table number: ";
cin>>tnum;
n=1;
while(n<11)
{
cout<<"\n"<<tnum<<" X
"<<n<<" = "<<tnum*n;
n++;
}
getch();
return 0;
}
Code view in dev compiler:
Compile the program Ctrl+F9
Run program Ctrl+F10