Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include <iostream>
- using namespace std;
- int main()
- { int h;
- cin>>h;
- int k = 0;
- while(k<h){
- int p = k+1;
- while ( p < h){
- cout<<" ";
- p++;
- }
- int j = 0;
- int z = k+k+1;
- while ( j < z ){
- cout<<"*";
- j++;
- }
- cout<<endl; k++;
- }
- for (int n = 1; n< h ; n++){
- cout<<" ";
- }
- cout<<"*";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement