Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void rombo(int h){
- int k=h/2;
- for(int i=0;i<k;i++){
- for(int j=0;j<h;j++){
- if(j>=k-i && j<=k+i)
- cout<<"*";
- else
- cout<<" ";}
- cout<<"\n";}
- for(int i=0;i<h;i++)
- cout<<"*";
- cout<<"\n";
- for(int i=k-1;i>-1;i--){
- for(int j=h-1;j>-1;j--){
- if(j>=k-i && j<=k+i)
- cout<<"*";
- else
- cout<<" ";}
- cout<<"\n";}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement