[Problem]
给出两个浮点数,请你判断这两个浮点数是否相等
[Solution]
#include <iostream> #include <cmath> using namespace std;#define eps 0.000000001int main(){ double a, b;cin >> a >> b;if(fabs(a - b) < eps){ cout << "yes" << endl;}else{ cout << "no" << endl;}return 0; }