fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. double a, b, c;
  6. while (cin >> a >> b >> c) {
  7. cout << a << " + " << b << ((a+b==c)?" == ":" != ") << c << endl;
  8. }
  9. return 0;
  10. }
Success #stdin #stdout 0s 3460KB
stdin
3.0 6.0 9.0
0.3 0.3 0.6
0.3 0.6 0.9
0.3 0.2 0.5
0.1 0.9 1.0
stdout
3 + 6 == 9
0.3 + 0.3 == 0.6
0.3 + 0.6 != 0.9
0.3 + 0.2 == 0.5
0.1 + 0.9 != 1