fork download
  1. #include <iostream>
  2. #include <limits>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. for (int i = 0; i < 3; i++)
  9. {
  10. string name;
  11. int score = -1;
  12.  
  13. getline(cin, name);
  14. cin >> score;
  15. cin.clear();
  16. cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
  17.  
  18. cout << name << ' ' << score << '\n';
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 4396KB
stdin
саша
45
вова
22
паша
88
stdout
саша 45
вова 22
паша 88