Advertisement
Kacper_Michalak

Zadanie pętle 11

Dec 12th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x,z;
  7.     int i;
  8.  
  9.     cout << "Podaj dlugosc pierwszego boku:" << endl;
  10.     cin >> x;
  11.     z = x;
  12.     x = 0;
  13.     do
  14.     {
  15.         for (i = 0; i <= x; i++)
  16.         {
  17.             cout << "*";
  18.         }
  19.         x++;
  20.         cout << "\n";
  21.     } while (x != z);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement