MeehoweCK

Untitled

Oct 14th, 2020
2,035
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int wiersze, kolumny;
  8.  
  9.     cout << "Podaj liczbe wierszy i kolumn: ";
  10.     cin>> wiersze >> kolumny;
  11.  
  12.     for(int i = 0; i < wiersze; i++)
  13.     {
  14.         for(int j = 0; j < kolumny; j++)
  15.         {
  16.            if(j < i || j >= (kolumny - i))
  17.             cout << '*';
  18.            else
  19.             cout << '#';
  20.         }
  21.         cout << endl;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment