Advertisement
myloyo

9.1.15

Dec 17th, 2022 (edited)
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <string>
  2.  
  3. using namespace std;
  4. ifstream in("input.txt");
  5. ofstream out("output.txt");
  6.  
  7. int main()
  8. {
  9.     int k;
  10.     in >> k;
  11.     in.get();
  12.     string s, g;
  13.     while (getline(in, s)) {
  14.         char f = s[k - 1];
  15.         g += f;
  16.     }
  17.     out << g;
  18. }
  19. //2
  20. //империя
  21. //воз
  22. //арктангенс
  23. //еж
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement