Reverse Any Number |
This Program is Written in C++.
This Program is use to reverse any number.
Example: If the user will type 12345 then this program will reverse this value and you will get 54321 as a result.
This Program is written in C++ but Logic of this program can be implemented with the help of other languages too example C Language, C#, Java, PHP, JavaScript etc.
Code :
Output :
Output |
//write a program to reverse a Given Number ?
#include<iostream>
using namespace std;
main()
{
int n;
int rev = 0;
cout << "Enter a Number which you want to reverse : ";
cin >> n;
int temp = n;
while( temp != 0)
{
rev = rev * 10;
rev = rev + temp%10;
temp = temp/10;
}
cout << "The Reverse of " << n << " is : " << rev;
}
https://youtu.be/0RRUOIvmuWA I realized that I had my camera set up incorrectly, so when I upload…
https://youtu.be/C3oFfV20K_c Make Animated progress step bar using Figma
https://youtu.be/o3pSH_oRzko How to Hide All Grids in Figma
https://youtu.be/hdSUylKSsho How to Create Responsive Tool tip in Figma
https://youtu.be/AEiH7dSDhKo Having issue in figma pixel grid? learn how to show/ hide figma pixel grid…
https://youtu.be/iilYzHg9LwQ There are some issues going on in ventura OS its still in development phase…