+ 1
[SOLVED] If someone could help find whats wrong with this program.Itworks fine outside sololearn.But not in the playground
4 Respuestas
+ 3
I will post the solution here for anyone that comes across the same problem. pow(5,3) or 5,2 will take and make them floats and do the math so for 5,2 you get 24.99999 and then it makes it a int dropping the .9999 and making it 24 or in our case 124. So you need to do (pow(rem,count)+0.5); that will round it up.
+ 7
Please follow the @Mooaholic's advice and let us all know here if that helped. An interesting case, I must say...
+ 3
I solved it 😁 redemption!!!!
+ 2
okay... so it's working now that I added 0.5 to pow(rem,count)....
thanks @Mooaholic 😊
you guys can check the code now....
https://code.sololearn.com/c35DBQr0qFoS/?ref=app