code of Alphabet K pattern
code: #include<stdio.h> #include<conio.h> #include<stdlib.h> int main() { int i,j,k,count=6; system("color 0f"); for(i=0;i<=11;i++) { for(j=0;j<2;j++) { printf("*"); } for(k=0;k<=6;k++) { if(k==count) { printf("***"); } else { printf(" ");//two spaces } } if(i<=5) { count--; } else if(i<=11) { count++; } printf("\n"); } getche(); }
Comments
Post a Comment
how I can help you?