Select Page

Hollow Pattern using Character/Alphabet

int main() { int r, c, size; int ch=65; printf(“ntEnter number:”); scanf(“%d”, &size); printf(“nt”); for(r = 0; r < size; r++) { for(c = 0; c < (2 * size); c++) { if(r + c <= size – 1)...

Pyramid Pattern using Character/Alphabet-1

int main() { int r,c,n,m,sp; int ch=65; printf(“ntEnter row:”); scanf(“%d”,&n); printf(“ntEnter column:”); scanf(“%d”,&m); printf(“t”); for(r=1; r<=n; r++) { sp=1; for(c=1; c<=m; c++) {...

‘X’ Pattern using character/Alphabet-3

int main() { int r,c,s; char ch=64; printf(“ntEnter Size:”); scanf(“%d”,&s); printf(“t”); for(r=1; r<=s; r++) { for(c=1; c<=s; c++) { if(c==r||c==(s+1-r)) { printf(“%c”,(char)ch+c); } else { printf(”...