Programming Code Center(PCC)
[CPP]

(PCC)::[How-to-write-CPP-Program-to-Reverse-a-Number]::[cpp]

File Name : Reverse_Number.cpp

//Example: C++ Program to Reverse an Integer
#include <iostream>
using namespace std;

int main()
{
    int n, reversedNumber = 0, remainder;

    cout << "Enter an integer: ";
    cin >> n;

    while(n != 0)
    {
        remainder = n%10;
        reversedNumber = reversedNumber*10 + remainder;
        n /= 10;
    }

    cout << "Reversed Number = " << reversedNumber;

    return 0;
}

Output :

Reverse_Number.jpg