Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "student.h"
- #include <iostream>
- #include <Windows.h>
- using namespace std;
- int main() {
- int n,b;
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- cout << "Введите количество студентов: "; cin >> n;
- student *d = new student[n];
- do {
- system("cls");
- cout << "====================" << endl;
- cout << " 1.Ввод данных " << endl;
- cout << " 2.Вывод данных " << endl;
- cout << " 3.Старший студент " << endl;
- cout << " 4.Выход " << endl;
- cout << "====================" << endl;
- cin >> b;
- switch (b) {
- case 1: {
- for (int i(0); i < n; i++) {
- system("cls");
- cout << "Студент №" << i + 1 << endl << endl;
- cout << "Введите ФИО студента: ";
- student::input_name(d,i);
- cout << "Введите возраст студента: ";
- student::input_age(d, i);
- cout << "Введите курс студента: ";
- student::input_StudYear(d, i);
- cout << "Введите оценку студента по 3 предметам(через пробел): ";
- student::input_grade(d, i);
- }
- }; break;
- case 2: {
- if (student::check_empty(d)) {
- cout << "Список пуст..." << endl;
- system("pause");
- }
- else {
- for(int i(0);i<n;i++)
- cout << student::show_name(d, i)<<"("<<student::show_age(d,i)<<") ["<<student::show_StudYear(d,i)<<"] Балл:"<<student::show_grade(d,i)<<endl;
- system("pause");
- }
- }; break;
- case 3: {
- if (student::check_empty(d)) {
- cout << "Список пуст..." << endl;
- system("pause");
- }
- else {
- cout << "Введите номер курса:"; int g; cin >> g;
- cout << student::SarodipSatra(d, n, g);
- system("pause");
- }
- }; break;
- case 4:exit(0);
- default:cout << "Неправильный ввод!" << endl;
- }
- } while (0==0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement