P049.c (653B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* Make this pattern for input n no of row. 8 Pattern : 9 # 10 @ @ 11 # # # 12 @ @ @ @ 13 # # # # # 14 */ 15 16 #include <stdio.h> 17 18 int main() 19 { 20 int i, j, n; 21 char a = '#', b = '@'; 22 printf("Enter row number : "); 23 scanf("%d", &n); 24 for (i = 1; i <= n; i++) 25 { 26 for (j = 1; j <= i; j++) 27 { 28 if (i % 2 == 0) 29 printf("%c\t", b); 30 else 31 printf("%c\t", a); 32 } 33 printf("\n"); 34 } 35 return 0; 36 }