fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. double a, b;
  5. cin >> a >> b;
  6. cout << fixed << setprecision (2) << 2*(a+b) << " " << a*b;
  7. }
Success #stdin #stdout 0.01s 5308KB
stdin
2.12 3.0
stdout
10.24 6.36