Guest User

Untitled

a guest
Jun 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <array>
  4.  
  5.  
  6. using namespace std;
  7.  
  8. string printShape(string type){
  9.     string asterisk[] = {
  10.         "     *****",
  11.         "    *******",
  12.         "   *********",
  13.         "  **********",
  14.         " ***********",
  15.         "************",
  16.         "  ******",
  17.         "  ******",
  18.         "  ******"
  19.     };
  20.  
  21.     if(type == "arrow"){
  22.         for(int i = 0; i < sizeof(asterisk); i++){
  23.             cout << asterisk[i] << endl;
  24.         }
  25.     }
  26.  
  27.     return type;
  28. }
  29.  
  30. int main(){
  31.     printShape("arrow");
  32.  
  33.     return 0;
  34. }
Add Comment
Please, Sign In to add comment