fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double L = (105.0 * 100.0)/(2.54 * 12.0);
  7. double W = (68.0 * 100.0)/(2.54 * 12.0);
  8. double time = 192.0;
  9. double C = 8.65 * M_PI;
  10. double P;
  11. cout << "The 2014 FIFA World Cup was played in Rio de Janeiro, Brazil. The Estádio Jornalista Mário Filho where many of the games were played is " << L << " × " << W << ".\nThe circumference of the ball is: " << C << " inches.\n";
  12. cout << "How many players?\n";
  13. cin >> P;
  14. cout << "Each will play on average " << (time * 11) / P <<" minutes.\n";
  15. }
Success #stdin #stdout 0s 4308KB
stdin
23
stdout
The 2014 FIFA World Cup was played in Rio de Janeiro, Brazil. The Estádio Jornalista Mário Filho where many of the games were played is 344.488 × 223.097.
The circumference of the ball is: 27.1748 inches.
How many players?
Each will play on average 91.8261 minutes.