- Home
- Course Category
- Course Result
- Course Detail
Hot Line: 0124-2383121
Course Introduction
Programs for practice
In the program below, we've asked the user to enter any number and then display its table on the screen in C++
Source Code:Print Table of Number
/* C++ Program - Print Table of Number */ #include<iostream.h> #include<conio.h> void main() { clrscr(); int num, i, tab; cout<<"Enter a number : "; cin>>num; cout<<"Table of "<<num<<" is \n\n"; for(i=1; i<=10; i++) { tab=num*i; cout<<num<<" * "<<i<<" = "<<tab<<"\n"; } getch(); }Output
Enter a number : 2 2 * 1=2 2 * 2=4 2 * 3=6 2 * 4=8 2 * 5=10 2 * 6=12 2 * 7=14 2 * 8=16 2 * 9=18 2 * 10=20