PracticeDev/study_cpp/cpp_primer_source_code/Chapter 3/fltadd.cpp

14 lines
277 B
C++

// fltadd.cpp -- precision problems with float
#include <iostream>
int main()
{
using namespace std;
float a = 2.34E+22f;
float b = a + 1.0f;
cout << "a = " << a << endl;
cout << "b - a = " << b - a << endl;
// cin.get();
return 0;
}