0
how to convert scientific number to integer(e.g: 4.72228e+08 to 472228167)
actually i am getting ans as 4.72228e+08(it is giving this value by using floor function in math library ) but i dont not want to convert into scientific number.
3 Antworten
+ 1
std::cout << std::fixed << number; should work.
+ 1
You can assign to an int in scientific notation, so the conversion is trivial. The problem is the size of the exponent. If it is too big it will show a negative number.
https://code.sololearn.com/cVEO51NsNUAE/?ref=app
0
but I don't want in decimal