Print inverse of number

what is wrong with my code.
#include
using namespace std;
int main(){
int n,rev=0,l;
cin>>n;
while(n!=0){
l=n%10;
rev=rev*10+l;
n=n/10;

}
cout<<rev<<endl;

}

hey @dips123deepali_c25f140838182212 you are reversing the number but the question is to print inverse of the number.