Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int l;
- int size = 1;
- int i = 0;
- int a = 0;
- int rows = 0;
- int main()
- {
- cout << "Podaj liczbe gwiazdek";
- cin >> l;
- //Pętla dla liczby linii
- while(l>0)
- {
- //Tworzy jedną linię
- for(a=0;a<size;a++)
- {
- if(l>0)
- {
- cout << "*";
- l--;
- }
- }
- cout << "\n";
- size++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement