ch3.11math.cc
来自「C++ source code for book-C++ and Object 」· CC 代码 · 共 22 行
CC
22 行
#include <iostream> // include a library for input and output
#include <cmath>
using namespace std;
int main() {
double d = 10.5;
double e;
cout << "return : " << modf(d, &e) << "\n";
cout << "e is: " << e << "\n";
int exp;
cout << "mantissa: " << frexp(d, &exp) << "\n";
cout << "exp is: " << exp << "\n";
d = 0;
cout << "mantissa: " << frexp(d, &exp) << "\n";
cout << "exp is: " << exp << "\n";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?