Solution:
#include<stdio.h>
int main()
{
int digit, num,rem;
printf("Enter positive integer number: ");
scanf("%d", &num);
while(num>0)
{
rem=rem*10+num%10;
num=num/10;
}
printf("\nYou have entered: ");
while (rem > 0)
{ digit = rem % 10;
printf("\t %d",digit);
rem=rem/10;
}
return 0;
}
0 Comments