fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7. int Y, Z, L, M, N;
  8. float X;
  9. cin >> X >> Y >> Z >> L >> M >> N;
  10. cout << fixed << setprecision(2);
  11. cout << "Partidas: " << int(X) << endl;
  12. cout << "Gols: " << (Y/X) << endl;
  13. cout << "Posse de bola: " << ((Z*100)/X) << "%" << endl;
  14. cout << "Vitórias: " << ((L*100)/X) << "%" << endl;
  15. cout << "Empates: " << ((M*100)/X) << "%" << endl;
  16. cout << "Derrotas: " << ((N*100)/X) <<"%" << endl;
  17.  
  18.  
  19. return 0;
  20.  
  21. }
Success #stdin #stdout 0s 4356KB
stdin
20 32 9 10 3 7 
stdout
Partidas: 20
Gols: 1.60
Posse de bola: 45.00%
Vitórias: 50.00%
Empates: 15.00%
Derrotas: 35.00%