Advertisement
Lucky134Lucky

DubovitskyDenis.Cycles.e

Feb 7th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 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.         int p = k+1;
  14.         while ( p < h){
  15.  
  16.             cout<<" ";
  17.            p++;
  18.  
  19.         }
  20.         int j = 0;
  21.         int z = k+k+1;
  22.         while ( j < z ){
  23.  
  24.             cout<<"*";
  25.            j++;
  26.  
  27.         }
  28.  
  29.         cout<<endl; k++;
  30.     }
  31.     for (int n = 1; n< h ; n++){
  32.         cout<<" ";
  33.      }
  34.      cout<<"*";
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement