Advertisement
Polnochniy

Untitled

Nov 13th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main()
  5. {
  6. setlocale(LC_ALL, "rus");
  7. string N;
  8. int n, i, numb;
  9. cout << "Введите символ: ";
  10. getline(cin, N);
  11. cout << "Введите количество символов: ";
  12. cin >> n;
  13. cout << "Нажмите на 1 ,чтобы сделать вертикально . Или на 2 ,чтобы было горизонатально " << endl;
  14. cin >> numb;
  15. cout << "_________________________________________________________" << endl;
  16. i = 0;
  17. if (numb == 1)
  18. while (i != n)
  19. {
  20. cout << N <<" " << endl;
  21. i++;
  22. }
  23. else if (numb == 2)
  24. while (i != n)
  25. {
  26. cout << N<<" " ;
  27. i++;
  28. }
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement