fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <cstdlib>
  5.  
  6. using namespace std;
  7.  
  8. struct Student {
  9. string NAME;
  10. string GROUP;
  11. int SES[3];
  12. };
  13.  
  14. int main () {
  15. vector<Student> student;
  16. unsigned n;
  17. cout << "kilkist\t";
  18. cin >> n;
  19.  
  20. for (unsigned i = 0; i < n; ++i) {
  21. Student tmp;
  22. //cout << "name..";
  23. cin >> tmp.NAME;
  24. //cout << "GROUP..";
  25. cin >> tmp.GROUP;
  26. //cout << "SES..";
  27. cin >> tmp.SES[0] >> tmp.SES[1] >> tmp.SES[2];
  28. student.push_back(tmp);
  29. }
  30.  
  31. for (unsigned i = 0; i < student.size(); ++i) {
  32. cout << student[i].NAME << "\t"
  33. << student[i].GROUP << "\t"
  34. << student[i].SES[0] << " "
  35. << student[i].SES[1] << " "
  36. << student[i].SES[2] << endl;
  37. }
  38.  
  39. return 0;
  40. }
Success #stdin #stdout 0s 3480KB
stdin
3
qwe qwe 4 4 4
asd asd 4 3 4
zxc zxc 5 5 5
stdout
kilkist	qwe	qwe	4 4 4
asd	asd	4 3 4
zxc	zxc	5 5 5