pc004.c (618B)
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 /* Pattern : 8 5 4 3 2 1 9 4 3 2 1 10 3 2 1 11 2 1 12 1 13 for n = 5 14 */ 15 16 #include <stdio.h> 17 int main() 18 { 19 int i, j, k, n; 20 printf("Enter n : "); 21 scanf("%d", &n); 22 for (i = n; i >= 1; i--) 23 { 24 for (j = 1; j <= i - 1; j++) 25 { 26 printf("\t"); 27 } 28 for (k = i; k >= 1; k--) 29 { 30 printf("%d\t", k); 31 } 32 printf("\n"); 33 } 34 return 0; 35 }