BeloMaximka

Belov_HW_O33

Oct 19th, 2021
895
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3. #include <Windows.h>
  4. using namespace std;
  5.  
  6. void main()
  7. {
  8.     SetConsoleCP(1251);
  9.     string resumeTemplate[5]{ "Имя: ", "Фамилия: ", "Отчество: ", "Возвраст: ", "Образование: " };
  10.     string input;
  11.     cout << "Enter name: ";
  12.     cin >> input;
  13.     resumeTemplate[0] += input;
  14.     cout << "Enter surname: ";
  15.     cin >> input;
  16.     resumeTemplate[1] += input;
  17.     cout << "Enter midname: ";
  18.     cin >> input;
  19.     resumeTemplate[2] += input;
  20.     cout << "Enter age: ";
  21.     cin >> input;
  22.     resumeTemplate[3] += input;
  23.     cout << "Enter education: ";
  24.     cin >> input;
  25.     resumeTemplate[4] += input;
  26.  
  27.     ofstream file("resume.txt");
  28.     for (auto& temp : resumeTemplate)
  29.     {
  30.         file << temp << endl;
  31.     }
  32.     file.close();
  33. }
RAW Paste Data