A five-digit number is entered through the keyboard. WAP in C to obtain the reversed number and to determine whether the original and reversed numbers are equal or not.

#include<stdio.h>
void main()
{
long int rno,gno,n,r1,r2,r3,r4,no1,no2,no3,no4;
printf("Enter any 5-digit number :");
scanf("%ld",&gno);
n=gno;
r1=gno%10;
no1=gno/10;
r2=no1%10;
no2=no1/10;
r3=no2%10;
no3=no2/10;
r4=no3%10;
no4=no3/10;
rno=(10000*r1+1000*r2+100*r3+10*r4+no4);
printf("\nThe reverse number is %ld",rno);
      if(n==rno)
           printf("\nThe Given number and reverse number is equal");
      else
          printf("\nThe given number and reverse number is not Equal");
}