rev number

#include <stdio.h>

int main()

{

    int num,revnum,rem;

    printf(“Enter the number to be reversed\n”);

    scanf(“%d”,&num);

    while(num!=0)

    {

        rem=num%10;

        revnum=revnum*10+rem;

        num=num/10;

    }

    printf(“The reversed number is %d \n”,revnum);

    return 0;

}