Last active
April 18, 2016 23:17
-
-
Save kasramp/4132efed97215b601415da1550e9caa6 to your computer and use it in GitHub Desktop.
Star
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int main (int args, char *argv[]) { | |
for (int i = 0; i < 5; i++) { | |
for (int j = i; j < 5; j++) { | |
cout << "*"; | |
} | |
for (int j = 0; j <= ((i + 1) * 2); j++) { | |
cout << " "; | |
} | |
for (int j = i; j < 5; j++) { | |
cout << "*"; | |
} | |
cout << endl; | |
} | |
for (int i = 0; i < 5; i++) { | |
for (int j = 0; j <= i; j++) { | |
cout << "*"; | |
} | |
for (int j = 11; j > (i * 2); j--) { | |
cout << " "; | |
} | |
for (int j = 0; j <= i; j++) { | |
cout << "*"; | |
} | |
cout << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment