+ 2
Can number outputs only be represented in int or floats or are there any way to represent a square root in the output?
Just tell me how if there is a way and a code with comments will be helpful thanks!
3 Réponses
+ 10
Numbers can be *stored* as either integers or floating-point values. As for output, it is up to you to do the magic through calculations.
https://code.sololearn.com/cbyhPCt7aOau/?ref=app
+ 6
There are languages which can store irrational numbers and make proper, non-decimal calculations on them. Neither of those is available at SoloLearn, though...
0
in Java we have function sqrt(/*number*/);