+ 2
Is my math wrong?
5*5*5 gave the right result. but 5 to the 3rd power didnt. https://code.sololearn.com/c7ny2MLKqw2u/?ref=app
7 Respuestas
+ 4
It's because sololearn's C++ compiler sucks.
Try storing it in a float/double, that fixes it.
+ 3
I checked this code and tried some changes but it always shows 5^3 equals 124. I also want to know Why it shows this output?
+ 2
3^5 = 3*3*3*3*3 =243
+ 2
thanks! making them into a float helped!
+ 2
Yeah it works now