fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. /*
  8.  
  9.  
  10. int creditHours; // Declaring a variable
  11. int hrsofStudy; // Declaring a variable
  12.  
  13.  
  14.  
  15.  
  16. cout << "How many credit hours are you taking?" << endl; // First question
  17. cin >> creditHours; // User input for first question
  18. cout << "The amount of time you should spend studying outside of class is " << (creditHours) * 3 << " hours." << endl; // The final output statement telling user how many hours they should be studying
  19.  
  20.   cout << "How many hours are you studying?" << endl; // Second question
  21.   cin >> hrsofStudy; // User input for second question
  22.   cout << "Based off your input, you should be studying " << ((creditHours) *3) - (hrsofStudy) << " more hours." << endl; // The difference statement.
  23.  
  24.   cout << "The Estádio Jornalista Mário Filh soccer field's demensions are 105 m × 68 m." << endl;
  25. cout << "If the stadium demensions were converted to feet, it would be approximately " << 3.28 * 105<< "m " << "x " << 3.28 * 68 <<"m" << endl;
  26.  
  27.   */
  28.  
  29. // prob 2
  30.  
  31.  
  32. cout << "The Estádio Jornalista Mário Filh soccer field's demensions are 105 m × 68 m." << endl;
  33. cout << "If the stadium demensions were converted to feet, it would be approximately " << 3.28 * 105<< "m " << "x " << 3.28 * 68 <<"m" << endl;
  34.  
  35.  
  36.  
  37. cout << "The circumference of a size 5 ball is " << 2 * M_PI * 11 << "cm." << endl;
  38. int players;
  39. cin >> players;
  40. cout << "Each player will be in the game for " << 90 / (players/11) << " minutes." << endl;
  41.  
  42.  
  43.  
  44. return 0;
  45.  
  46.  
  47. }
  48.  
Success #stdin #stdout 0s 4420KB
stdin
14 29 11
stdout
The Estádio Jornalista Mário Filh soccer field's demensions are 105 m × 68 m.
If the stadium demensions were converted to feet, it would be approximately 344.4m x 223.04m
The circumference of a size 5 ball is 69.115cm.
Each player will be in the game for 90 minutes.