Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. void pijlVlag(char in1, char in2, int hoogte){
  2.     if(hoogte == 0){
  3.         hoogte = 1;
  4.     }
  5.    
  6.     if(hoogte%2 != 1){
  7.         hoogte++;
  8.     }
  9.    
  10.     for(int i = 0;i < hoogte;i++){
  11.         int bol1 = hoogte-i;
  12.         int bol2 = hoogte+i+1;
  13.         for(int j = 0;j < hoogte*2+1;j++){
  14.             if(j == 0){
  15.                 cout << "#";
  16.             }
  17.             else if(j == bol1){
  18.                 cout << in2;
  19.             }
  20.             else if(j == bol2){
  21.                 cout << in2;
  22.             }
  23.             else{
  24.                 cout << in1;
  25.             }
  26.            
  27.            
  28.         }
  29.         cout << endl;
  30.     }
  31.    
  32.     for(int i = 0;i < hoogte;i++){
  33.         cout << "#" << endl;
  34.     }
  35.    
  36.    
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement