fojtasd

Untitled

Oct 21st, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 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. cout << "Zdejte pocet schodu:" << endl;
  10. int pocet;
  11. cin >> pocet;
  12. if ((!cin.fail())&& (pocet>=0))
  13. {for (int a; a<=pocet; a++)
  14. {if (a==1){
  15. cout << vystup_1 << endl;}
  16. else cout << vystup_x= "X" vystup_1 << endl;
  17. }
  18. cout << "X" << endl;}
  19.  
  20. else cout << "Spatny vstup." << endl;
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment