Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int wybor;
- int main()
- {
- cout << "*******MENU**********\n"
- "1. Narysuj trojkat\n"
- "2. Nie rysuj trojkata\n"
- "*********************\n"
- "Wybierz: \n";
- cin>> wybor;
- switch(wybor) {
- case 1 :
- {
- int nilosc;
- cout << "Wprowadź liczbe 8: ";
- cin >> nilosc;
- for(int i = 1; i <= nilosc; ++i)
- {
- for(int j = 1; j <= i; ++j)
- {
- cout << "# ";
- }
- cout << "\n";
- }
- }
- break;
- case 2 :
- {
- cout << "Przykro mi :(\n";
- }
- default :
- {
- cout << "Nie wybrales dostepnych opcji!";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement