Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int a;
- int b=0;
- int c;
- int d;
- cout << "vvedit' vysotu yalynky:";
- cin >> a;
- while (b<a)
- {
- c=a-b;
- while (c>0)
- {
- cout << " ";
- c--;
- }
- d=0;
- while (d<2*b+1)
- {
- cout << "*";
- d++;
- }
- cout<< endl;
- b++;
- }
- while (a>0)
- {
- cout << " ";
- a--;
- }
- cout << "*";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement