Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "stdafx.h"
- using namespace std;
- struct FIO{
- char name[30];
- char surname[30];
- char patronymic[30];
- };
- struct Student{
- FIO fio;
- int group;
- int exams;
- char discipline[7];
- int mark;
- };
- void output_info(Student *A, int n){
- for (int i = 0; i<n; i++)
- {
- cout << A[i].fio.name << endl;
- cout << A[i].fio.surname << endl;
- cout << A[i].fio.patronymic << endl;
- cout << A[i].group << endl;
- cout << A[i].mark << endl;
- cout << A[i].discipline << endl;
- }
- }
- void get_info(Student *A, int n){
- for (int i = 0; i < n; i++){
- cout << endl;
- cout << "ФИО";
- cin.getline(A[i].fio.name, 30);
- cin.getline(A[i].fio.surname, 30);
- cin.getline(A[i].fio.patronymic, 30);
- cout << endl;
- cout << "Число экзаменов";
- cin >> A[i].exams;
- cout << endl;
- cout << "Названия дисциплин";
- cin.getline(A[i].discipline, 30);
- cout << endl;
- cout << "Оценки";
- cin >> A[i].mark;
- cout << endl;
- cout << "Группа";
- cin >> A[i].group;
- }
- }
- int _tmain(int argc, _TCHAR* argv[]){
- int n;
- cout << "Введите n";
- cin >> n;
- Student*A = new Student[n];
- get_info(A, n);
- output_info(A, n);
- Student disp[7];
- for (int i = 0; i < 7; i++){
- cin.getline(disp[i].discipline,30);
- }
- Student MARK[7];
- for (int i = 0; i < 7; i++){
- cin >> MARK[i].mark;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement