program to input three digit number and find its reverse-by enggfact - Enggfact

Latest

Convert your Passion into your Profession

Monday, September 2, 2019

program to input three digit number and find its reverse-by enggfact

#include<stdio.h>
int main()
{
int num,d1,d2,d3,rev;
printf("enter any three digit number");
scanf("%3d",&num);
d1=num%10;
num=num/10;
d2=num%10;
num=num/10;
d3=num%10;
num=num/10;
rev=d1*100+d2*10+d3*1;
printf("\n %d",rev);
return 0;
}

No comments:

Post a Comment