Write a program to input a three digit number and print its reverse
Answers
Answered by
2
#include <stdio.h>
main()
{
int one, two, three;
printf("Enter a three-digit number: ");
scanf("%.1d%.1d%.1d", &one, &two, &three);
printf("The reversal is: %d%d%d", three, two, one);
return 0;
}
main()
{
int one, two, three;
printf("Enter a three-digit number: ");
scanf("%.1d%.1d%.1d", &one, &two, &three);
printf("The reversal is: %d%d%d", three, two, one);
return 0;
}
Similar questions
Math,
6 months ago
Math,
6 months ago
Environmental Sciences,
6 months ago
Math,
1 year ago
History,
1 year ago
Math,
1 year ago
Social Sciences,
1 year ago