Printing reverse table using While Loop in C++


Example Program:

Here is the simple program for printing reverse tables using While Loop in C++.

Source Code

#include<iostream>
using namespace std;
int main()
{
    int i,n=1,m,a;
    cout<<"\nEnter the limit:";
    cin>>i;
    cout<<"\nEnter the table's number:";
    cin>>a;
    while(i>=n)
    {
        cout<<"\n"<<i<<"*"<<a<<"="<<i*a;
        i--;
    }
    return 0;
}
To download raw file Click Here

Output

Enter the limit:9
Enter the table's number:9
9*9=81
8*9=72
7*9=63
6*9=54
5*9=45
4*9=36
3*9=27
2*9=18
1*9=9

Basic Programs


Flow Control

IF Statement Examples


Switch Case

Goto Statement

Break and Continue

While Loop

Do While Loop

For Loop

Friend Function in C++


String Examples


Array Examples


Structure Examples


Structure & Pointer Examples


Structure & Functions Examples


Enumeration Examples


Template Examples


Functions


List of Programs


Pointer Examples


Memory Management Examples


Pointers and Arrays


Virtual Function Examples



Learn All in Tamil © Designed & Developed By Tutor Joes