fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. double a;
  6. double b;
  7. cin >> a >> b;
  8. cout << fixed << setprecision(2) << (a+b) << endl << (a-b) << endl << (a*b) << endl << (a/b);
  9. return 0;
  10. }
Success #stdin #stdout 0.01s 5284KB
stdin
2
4
stdout
6.00
-2.00
8.00
0.50