Advertisement
Lucky134Lucky

Yollochka

Feb 8th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {     int h;
  7.      cin>>h;
  8.  
  9.  
  10.      int k = 0;
  11.     while(k<h)
  12.         {
  13.  
  14.         int p = k+1;
  15.         while ( p < h)
  16.                 {
  17.                    cout<<" ";
  18.                    p++;
  19.                 }
  20.                
  21.         int j = 0;
  22.         int z = k+k+1;
  23.         while ( j < z )
  24.                 {
  25.                     cout<<"*";
  26.                      j++;
  27.                 }
  28.  
  29.         cout<<endl; k++;
  30.        }
  31.     for (int n = 1; n< h ; n++)
  32.                 {
  33.                    cout<<" ";
  34.                 }
  35.      cout<<"*";
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement