Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <array>
- using namespace std;
- string printShape(string type){
- string asterisk[] = {
- " *****",
- " *******",
- " *********",
- " **********",
- " ***********",
- "************",
- " ******",
- " ******",
- " ******"
- };
- if(type == "arrow"){
- for(int i = 0; i < sizeof(asterisk); i++){
- cout << asterisk[i] << endl;
- }
- }
- return type;
- }
- int main(){
- printShape("arrow");
- return 0;
- }
Add Comment
Please, Sign In to add comment