c++ program to reverse a number
#include <iostream>
using namespace std;
int main()
{
int n, rem=0, reverse;
cin>>n;
while(n!=0)
{
rem=n%10;
reverse=reverse*10+rem;
n/=10;
}
cout<<reverse;
return 0;
}
Hello, I'm Arjunji, Currently I'm Pursuing MCA. I like to learn something new in my free time and thinking about innovative ideas.
I believe in myself and have a positive attitude towards work which I pursue everyday.
Looking forward to learn new things every single day.
Read More
No comments:
Post a Comment