we make a Simple Program in C++ Program to Print Table of Any Number with any Number of Turns it is Very easy.You Try Also.
C++ Program to Print Table of Any Number
#include<iostream> #include<conio.h> using namespace std; int main() { int number; int end; int c; cout<<"Enter the Table Number"<<endl; cin>>number; cout<<"Enter the Number of Turns "<<endl; cin>>end; for(int b=1;b<=end;b++) { c=number*b; cout<<number<<" * "<<b<<" = "<<c<<endl; } system("pause"); return 0; }
Output of Program
Enter any number:6
6 * 1 = 6
6 * 2 = 12
6 * 3 = 18
6 * 4 = 24
6 * 5 = 30
6 * 6 = 36
6 * 7 = 42
6 * 8 = 48
6 * 9 = 54
6 * 10 = 60
Enter an integer: 5
5 * 1 = 5
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
5 * 5 = 25
5 * 6 = 30
5 * 7 = 35
5 * 8 = 40
5 * 9 = 45
5 * 10 = 50