Wednesday, March 5, 2014

C program to reverse a number

Share Post:
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,num;
    printf("enter the 2-digit number");
    scanf("%d",num);
    a=num%10;
    num=num/10;
    printf("the reverse is %d%d",num,a);
    return 0;

}

0 comments:

Post a Comment