desislava_topuzakova

01. Read Text

Feb 5th, 2022
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. //не знаем колко точно пъти искаме да повтаряме нещо - while
  7. //какво повтаряме: четем текст -> отпечатваме текст
  8. //стоп: текст == "Stop"
  9. //продължаваме: текст != "Stop"
  10. string text;
  11. cin >> text;
  12.  
  13. while (text != "Stop")
  14. {
  15. cout << text << endl;
  16. cin >> text;
  17. }
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment