MeehoweCK

Untitled

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