Created
November 15, 2013 15:51
-
-
Save Codeplaza/7486557 to your computer and use it in GitHub Desktop.
Awesome PAttern
This file contains hidden or 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
| //A pattern by MADAN LAL The FASTian | |
| #include<stdio.h> | |
| #include<conio.h> | |
| #include<windows.h> | |
| int main() | |
| { | |
| int pk,x; | |
| for(x=0;x<255;x++){ | |
| printf("%d:%c\n",x,x);} | |
| printf("Select any symbol:"); | |
| scanf("%d",&pk); | |
| int a=1,i,j,k; | |
| system("cls"); | |
| system("color 0F"); | |
| //Printing two upper right-angled triangles | |
| for(i=0;i<11;i++) | |
| { | |
| for(j=0;j<=i;j++) | |
| { | |
| printf(" %c",pk); | |
| a=0; | |
| } | |
| for(k=40;k>i*4;k--){ | |
| printf(" "); | |
| } | |
| for(j=0;j<=i;j++) | |
| { | |
| printf(" %c",pk); | |
| a=0; | |
| } | |
| a=1; | |
| printf("\n"); | |
| } | |
| //Printing two lower right-angled triangles | |
| for(i=0;i<10;i++) | |
| { | |
| for(j=9;j>=i;j--) | |
| { | |
| printf(" %c",pk); | |
| a=0; | |
| } | |
| for(k=-3;k<=i*4;k++){ | |
| printf(" "); | |
| } | |
| for(j=9;j>=i;j--) | |
| { | |
| printf(" %c",pk); | |
| a=0;} | |
| a=1; | |
| printf("\n"); | |
| } | |
| printf("\n\n\n\n\t\t\t\t\t\t\t\tBy:Madan Lal"); | |
| getch(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wondering why you have included windows.h ??
is system(...) is from windows.h ??