C Code Snippet to Print Swastik Symbol
Print Swastik symbol in C
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<stdio.h> | |
#include<conio.h> | |
void main() | |
{ | |
char s[10][10]; | |
int i,j; | |
clrscr(); | |
for(i=0;i<9;i++) | |
{ | |
for(j=0;j<9;j++) | |
{ | |
s[i][j]='*'; | |
} | |
} | |
for(i=0;i<4;i++) | |
{ | |
for(j=1;j<4;j++) | |
{ | |
s[i][j]=' '; | |
} | |
} | |
for(i=1;i<4;i++) | |
{ | |
for(j=5;j<9;j++) | |
{ | |
s[i][j]=' '; | |
} | |
} | |
for(i=5;i<8;i++) | |
{ | |
for(j=0;j<4;j++) | |
{ | |
s[i][j]=' '; | |
} | |
} | |
for(i=5;i<9;i++) | |
{ | |
for(j=5;j<8;j++) | |
{ | |
s[i][j]=' '; | |
} | |
} | |
for(i=0;i<9;i++) | |
{ | |
for(j=0;j<9;j++) | |
{ | |
printf("%c ",s[i][j]); | |
} | |
printf("\n"); | |
} | |
getch(); | |
} |
nice but can you tell me how to make it with cout command removing the char
ReplyDeleteits right....###print swastika in middle of the screen (input must be odd and grater than 4)....please tell me program in c language
ReplyDelete