Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <string>
- using namespace std;
- int main(){
- setlocale(0, "");
- string name[100], surname[100], faculty[100], number[100] ;
- int count=1, c=1;
- start:
- cout << setiosflags(ios::left) << setw(15) << "Фамилия" << setw(15) << "Имя" << setw(20) << "Факультет" << setw(5) << "Группа" <<endl;
- cout << setfill('-') << setw(56) << "-" <<endl;
- if (count == 2){
- int s=c;
- for (int i=0; i<=s; i++)
- {
- s--;
- cout << setfill(' ') << setiosflags(ios::left) << setw(15) << surname[s] << setw(15) << name[s] << setw(20) << faculty[s] << setw(5) << number[s] << endl;
- }
- }
- cout << setfill(' ') << "Выберите действие:\t1. Добавить еще студента\t2. Выход" << endl;
- cin >> count;
- if (count == 1){
- cout << "Введите фамилию: ";
- cin >> surname[c];
- cout << "Введите имя: ";
- cin >> name[c];
- cout << "Введите факультет: ";
- cin >> faculty[c];
- cout << "Введите номер группы: ";
- cin >> number[c];
- c++;
- count++;
- system("cls");
- goto start;
- }
- system ("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement