Computer Science, asked by xGUITARx, 5 months ago

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 vinshultyagi
8

\huge\tt\colorbox{lime}{Answer ✌️}

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