MCPcopy Create free account
hub / github.com/ShiqiYu/CPP / main

Function main

week02/examples/float.cpp:4–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <iomanip>
3using namespace std;
4int main()
5{
6 float f1 = 1.2f;
7 float f2 = f1 * 1000000000000000;
8 cout << std::fixed << std::setprecision(15) << f1 << endl;
9 cout << std::fixed << std::setprecision(1) << f2 << endl;
10 return 0;
11}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected