Friday, May 31, 2019

program to print reverse of the given numbers...in c

/* ***********************************************
    Write a program to print reverse of the given numbers

 date:31-05-2019
 created by:ANIL DURGAM

*****************************************************/

#include <stdio.h>
#include <stdlib.h>

int main()
{   int a=0,b=0;
    printf("please enter a number\n");
    scanf("%d",&a);
    b=a%10;
    printf("%d",b);
    b=a/10;
    a=b%10;
    printf("%d",a);
    a=b/10;
    printf("%d\n",a);
    return 0;
}

No comments:

Post a Comment

python class topic video