Advertisement
praktikum_cpp1

Основы С++ / Тема 1 / Урок 9. Строки / Задача 3

Sep 10th, 2020
6,440
1
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 1 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     string a, b, c;
  8.     getline(cin, a);
  9.     getline(cin, b);
  10.     getline(cin, c);
  11.     cout << c << endl
  12.          << b << endl
  13.          << a << endl;
  14. }
Advertisement
Comments
  • DniwePro
    258 days
    # text 0.38 KB | 0 0
    1. #include <iostream>
    2. #include <string>
    3.  
    4. using namespace std;
    5.  
    6. int main() {
    7. string name1, name2, name3;
    8. getline(cin, name1); // считайте три названия книг целиком и выведите их в обратном порядке
    9. getline(cin, name2);
    10. getline(cin, name3);
    11. cout << name3 << endl << name2 << endl << name1 << endl;
    12.  
    13. }
Add Comment
Please, Sign In to add comment
Advertisement