write a program to input a 3 digit number and print it's reverse.
IN JAVA
Please those of u who know java check the above attached image and tell if the solution is correct or not ........
Attachments:
Answers
Answered by
8
code:-
#include <stdio.h>
int main()
{
int n, num1,num2,num3, reverse;
printf("Enter the number to reverse:\n");
scanf("%d", &n);
num1 = n / 100;
num2 = (n % 100) / 10;
num3 = (n % 10) / 100;
reverse = num3*100+ num2*10;
printf(" The reverse is %d", reverse);
system("pause");
return 0;
}
Similar questions
Science,
2 months ago
Social Sciences,
2 months ago
Math,
2 months ago
Math,
4 months ago
English,
10 months ago
Computer Science,
10 months ago