Again, help please πŸ˜… | SoloLearn: Learn to code for FREE!

0

Again, help please πŸ˜…

https://code.sololearn.com/cO1AxhohECU5/?ref=app

1/18/2021 2:37:19 PM

Ira Sarkar

7 Answers

New Answer

+2

printf("Enter the five digit number: \n"); scanf("%d", &n); while(n>0){ int rem=n%10; revnum=revnum*10 + rem; n=n/10; } printf("The reversed number is: "); printf("%d",revnum); return 0;

+1

Ira Sarkar you didn't told us that you have to solve it without loop. hopefully you got the answer tho.

+1

Ira Sarkar now that you have solved it with inline code, you might enjoy seeing another approach. Here is a way to use recursion to print the number from right to left without using a loop: https://code.sololearn.com/ccK0p8BIKAaS/?ref=app

+1

Brian yes, thank you.😊

0

Abhay i have got to solve it without loopπŸ˜…

0

Abhay but I found my answer, I think, not sure. Let me tryπŸ˜…

0

Abhay yesπŸ˜… I got it, thanks a lot though!