Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <conio.h>
- #include <iostream>
- #include <cstdio>
- #include <Windows.h>
- using namespace std;
- struct ZNAK {
- string Fam;
- int Data[3];
- string Znak;
- };
- ZNAK Z[8];
- int main(){
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- int month;
- setlocale(LC_ALL, "Russian");
- for (int i = 0; i < 7; i++) {
- cout << "Введите Фамилию:";
- cin >> Z[i].Fam;
- cout << "Введите день рождения:";
- cin >> Z[i].Data[0];
- cout << "Введите месяц рождения:";
- cin >> Z[i].Data[1];
- cout << "Введите год рождения:";
- cin >> Z[i].Data[2];
- cout << "Введите Знак зодиака:";
- cin >> Z[i].Znak;
- cout << endl;
- }
- cout << "Введите месяц: ";
- cin >> month;
- for (int i = 0; i < 8; i++)
- {
- if (month == Z[i].Data[1]) {
- cout << "Фамилия: " << "Дата рождения: " << Z[i].Data[0] << "." << Z[i].Data[1] << "." << Z[i].Data[2] << "Знак зодиака: " << Z[i].Znak;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement