Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <locale>
- using namespace std;
- struct Student {
- string name, inic;
- int date, month, year;
- };
- int main() {
- setlocale(LC_ALL, "");
- int n;
- char separator = '.';
- cout << "Введите количество:\n";
- cin >> n;
- Student* arr = new Student[n];
- cout << "Вводите студентов:\n";
- for (int i = 0; i < n; ++i) {
- Student a;
- cin >> a.name >> a.inic >> a.date >> separator >> a.month >> separator >> a.year;
- arr[i] = a;
- }
- for (int i = 0; i < n; ++i) {
- if (arr[i].month >= 3 && arr[i].month <= 5) cout << arr[i].name << " " << arr[i].inic << "\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement