0

exponential to numbers

how to convert "1e+018" to "1000000000000000000" in c++

9th Dec 2017, 5:51 AM
Sabbir Hossain
Sabbir Hossain - avatar
3 Respostas
+ 5
You input 1e+18 on console right, and save it to a float? Use cout.setf(ios::fixed) command to set the decimal display mode to fixed notation and print the 0s as it is...
9th Dec 2017, 6:53 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
I don't really know c++ but I found this in < 30 seconds on Google. Maybe this is what you're looking for. https://stackoverflow.com/questions/9411118/convert-scientific-notation-to-decimal-in-c
9th Dec 2017, 6:07 AM
Nope
Nope - avatar