fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. string name;
  7. double height, weight;
  8. cin >> name >> height >> weight;
  9.  
  10. double bmi = weight / height / height;
  11.  
  12. cout << name << " (" << bmi << ")" << endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5284KB
stdin
Arthur 1.73 72
stdout
Arthur (24.0569)