Coding of reverse no

in programe •  7 years ago 

i am a learner.
#include <iostream.h>
#include<iostream.h>
using namespace std;

main()
{
int no = 0, remainder;

int n, reversedno = 0, remainder;

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

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

cout << "Reversed no is = " << reversedno;

return 0;

}

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

great my brother

You have written #include <iostreem.h> twice?