Advertisement
Guest User

17

a guest
Apr 26th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. //17(б)
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. struct carOwner
  7. {
  8.     string F, IO, carModel, carColor, carNumber;
  9. };
  10.  
  11. int main()
  12. {
  13.     int N;
  14.     setlocale(LC_ALL, "russian");
  15.     cout << "Введите количество владельцев авто:";
  16.     cin >> N;
  17.     carOwner Massive[N];
  18.     for(int i = 0; i < N; i++)
  19.     {
  20.         cout << "Введите фамилию и инициалы владельца #" << i+1 << "; ";
  21.         cin >> Massive[i].F;
  22.         getline(cin, Massive[i].IO);
  23.         cout << "Введите марку машины владельца #" << i+1 << "; ";
  24.         cin >> Massive[i].carModel;
  25.         cout << "Введите номер машины владельца #" << i+1 << "; ";
  26.         cin >> Massive[i].carNumber;
  27.         cout << "Введите цвет машины владельца #" << i+1 << "; ";
  28.         cin >> Massive[i].carColor;
  29.     }
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement