+ 1
How to invert a decimal number with function in c++?
For example:12,345 ---> 543,21
12 odpowiedzi
+ 2
By converting it to a string
+ 1
Martin Taylor I think so it is quite tricky to reverse a number using loops only. Isn't it?
+ 1
Atul because i don't want to use string And no other way came to my mind
+ 1
Atul ok thanks
+ 1
implementation of reversed float (using double for better precision), without string:
https://code.sololearn.com/cxNZV8vEmt28/?ref=app
0
Nazanin Is this your attempt for the above question ❓
0
I am not able to understand why you used too many loops?
0
If you don't want to use strings then try to make your number as a whole number
0
I don't really know why these questions are asked at the university. A programmer will never use such this function.