带e是指10的 e后面次方 

#include <iostream>
int main()
{
    float f;
    f = 9.87654321f;
    std::cout << f << std::endl;
    f = 987.654321f;
    std::cout << f << std::endl;
    f = 987654.321f;
    std::cout << f << std::endl;
    f = 9876543.21f;
    std::cout << f << std::endl;
    f = 0.0000987654321f;
    std::cout << f << std::endl;
    return 0;
}

输出:

9.87654
987.654
987654
9.87654e+006
9.87654e-005

相关文章:

  • 2022-01-24
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2021-06-03
  • 2021-10-06
猜你喜欢
  • 2022-01-27
  • 2022-02-24
  • 2021-05-26
  • 2021-12-11
  • 2021-10-11
  • 2021-06-23
  • 2022-12-23
相关资源
相似解决方案