Advertisement
YT_o4ka

Untitled

Apr 22nd, 2022
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include <windows.h>
  4. #include <fstream>
  5. using namespace std;
  6.  
  7. struct predm {
  8. char name[20];
  9. int mark;
  10. };
  11. struct session {
  12. predm p[10];
  13. int count;
  14. };
  15.  
  16. struct student {
  17. char fam[20];
  18. char im[20];
  19. char ot[20];
  20. int b_day;
  21. int b_month;
  22. int b_year;
  23. int year_apply;
  24. char kaf[20];
  25. char group[20];
  26. int zachetka;
  27. session s[10];
  28. };
  29.  
  30. class input {
  31. public:
  32. int count;
  33. void in_count() { cout << "введите число студентов"; cin >> count;}
  34.  
  35. };
  36.  
  37. class filework : public input {
  38. public:
  39. void f_in() {
  40. FILE* ou;
  41. int s = 0;
  42. fopen_s(&ou, "flilk", "wb");
  43. struct student chel;
  44. for (int i = 0; i < count ; i++) {
  45. cout << "ВВедите имя, фамилию и отчество студента ";
  46. cin >> chel.im >> chel.fam >> chel.ot;
  47. cout << "Введите дату рожедния студента, день, месяц и год ";
  48. cin >> chel.b_day >> chel.b_month >> chel.b_year;
  49. cout << "Введите кафедру, номер груммы и номер зачётки студента ";
  50. cin >> chel.kaf >> chel.group >> chel.zachetka;
  51. cout << "Введите количество ссесий, по которым вы хотите ввести информацию по данному студенту ";
  52. int temp_sess;
  53. cin >> temp_sess;
  54. for (int i; i < temp_sess; i++) {
  55. cout << "Введите количество предметов, по которым вы хотите ввести данные этой сессии ";
  56. int temp_subj;
  57. cin >> temp_subj;
  58. for (int j; j < temp_subj; j++) {
  59. cout << "Введите название предмета, а затем оценку по нему";
  60. }
  61.  
  62. }
  63. }
  64. }
  65.  
  66. };
  67.  
  68. int main()
  69. {
  70. SetConsoleCP(1251);
  71. SetConsoleOutputCP(1251);
  72.  
  73. input obj;
  74. obj.in_count();
  75.  
  76. }
  77.  
  78.  
  79.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement