fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. struct cauthu
  5. {
  6. string hoten;
  7. double nang, cao;
  8. int tuoi;
  9. };
  10.  
  11. int main()
  12. {
  13. ios_base::sync_with_stdio(false);
  14. cin.tie(NULL); cout.tie(NULL);
  15.  
  16. cauthu c1, c2;
  17. cin >> c1.hoten >> c1.nang >> c1.cao >> c1.tuoi;
  18. cin >> c2.hoten >> c2.nang >> c2.cao >> c2.tuoi;
  19. if(c1.tuoi < c2.tuoi)
  20. {
  21. cout << c1.hoten << ' ' << c1.nang << ' ' << c1.cao << ' ' << c1.tuoi;
  22. }
  23. else
  24. {
  25. cout << c2.hoten << ' ' << c2.nang << ' ' << c2.cao << ' ' << c2.tuoi;
  26. }
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
 2.08042e-317 2.08072e-317 1