fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6. class player {
  7. public:
  8. int number;
  9. string name;
  10. float score;
  11. };
  12.  
  13. int main() {
  14. player nba;
  15. for(int i=0; i<3; i++) {
  16. cin >> nba.number >> nba.name >> nba.score;
  17.  
  18. if(nba.score > 30.0) {
  19. cout << nba.number << " " << nba.name << " " << nba.score << endl;
  20. }
  21. }
  22. return 0;
  23. }
  24.  
  25.  
Success #stdin #stdout 0.01s 5268KB
stdin
1
Stephen_Curry
26.4
2
Luka_Doncic
33.9
3
Kevin_Durant
27.1
stdout
2 Luka_Doncic 33.9