0
Wrong output problem :(
Can anyone tell me plz why there is lots of 0s followed by 2 next to the output ? Where did they really come from ? https://code.sololearn.com/cNJ4H0Q0nW0T/?ref=app
8 ответов
+ 3
Maybe cause first assigned value of X is double not float so final value will be also double that's why there r so many 0s .Hope this helps 🙇🏻♂️
+ 3
Mdy Try small even numbers!
This generally doesn't create a big problem!
If yes then you can ask me anytime! I ll love to help you!
+ 2
This is because it becomes hard for the system to calculate in decimals because it uses binary!
So the answer becomes a bit wrong
+ 2
Maybe u r saying correct 😁
+ 1
I tried using double n then removed it and it worked for me 🤷🏻♂️
+ 1
Thanks
Doesn't this difference make any problem in more complicated codes ?
I tried smaller numbers , too and there was still some difference but less than the bigger numbers
+ 1
Yeah I tried and there were no difference this time .
Thanks for your help !