+ 2
Why 10^10 is 2147483647 not 10000000000 ?
I am writing code in kotlin who gives power of any value . But when I am enter num:10 , power: 10 it gives 2147483647 i don't understand why ? Anyone can tell why this output gives ? https://code.sololearn.com/cxkwD2Ze6LYT/?ref=app
3 Answers
+ 9
Because that is the highest value an integer can store. Use Long to reach 9,223,372,036,854,775,807.
+ 4
In Kotlin the integer type is 32 bits long, this the max value is 2,147,483,647.
+ 3
William Owens & John Wells Thanks for solving problems âșïž