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 ........
Share
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 ........
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
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;
}
Answer:
Hope it helps you plz follow me
Explanation:
code:-
code:-#include <stdio.h>
code:-#include <stdio.h>int main()
code:-#include <stdio.h>int main(){
code:-#include <stdio.h>int main(){int n, num1,num2,num3, reverse;
code:-#include <stdio.h>int main(){int n, num1,num2,num3, reverse;printf("Enter the number to reverse:\n");
code:-#include <stdio.h>int main(){int n, num1,num2,num3, reverse;printf("Enter the number to reverse:\n");scanf("%d", &n);
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;
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;
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;
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;
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);
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");
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;
}