Write a program to accept a number and print reverse of a number (in java)
ex.1567=7651
icse class 10th
i will mark you brainliest and follow you if you give me a correct answer
Answers
Answered by
5
Answer:
if (num < 0 || num > 9999) throw new IllegalArgumentException("Not a 4-digit number: " + num); int reverse = 0; for (int i = 0; i < 4; i++, num /= 10) reverse = reverse * 10 + num % 10; System. out. printf("%04d%n", reverse)
hope this helps you......
Answered by
1
Answer:
do you want to do sex with me
Similar questions