Advertisement
fojtasd

Untitled

Oct 21st, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. string vystup_x, vystup_1, vystup_2;
  8. vystup_1="_";
  9. int a = 0;
  10. cout << "Zdejte pocet schodu A:" << endl;
  11. int pocet;
  12. cin >> pocet;
  13. if ((!cin.fail())&& (pocet>=0))
  14. {for (int a; a<=pocet; a++)
  15. {if (a==1){
  16. cout << vystup_1 << endl;}
  17. else cout << vystup_x = "X" + vystup_1 << endl;
  18. }
  19. cout << "X" << endl;}
  20.  
  21. else cout << "Spatny vstup." << endl;
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement