How to output double-precision numbers in C language
This article mainly introduces "how C language outputs double-precision numbers". In daily operation, I believe that many people have doubts about how C language outputs double-precision numbers. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the question of "how C language outputs double-precision numbers". Next, please follow the editor to study!
Use printf () and% e to output double precision numbers.
Example
# include
Int main () {
Double d
/ / declare double precision variables
D = 12.001234
/ / define double precision variable
Printf (value of "d is le", d)
Return 0
}
Output result:
The value of d is 1.200123e+01, so the study of "how to output double precision numbers in C language" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!