Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string vystup_x, vystup_1, vystup_2;
- vystup_1="_";
- int a = 0;
- cout << "Zdejte pocet schodu A:" << endl;
- int pocet;
- cin >> pocet;
- if ((!cin.fail())&& (pocet>=0))
- {for (int a; a<=pocet; a++)
- {if (a==1){
- cout << vystup_1 << endl;}
- else cout << vystup_x = "X" + vystup_1 << endl;
- }
- cout << "X" << endl;}
- else cout << "Spatny vstup." << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement