bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / practice-c / pc004.c

pc004.c (482B)


      1 /* Pattern :
      2                     5   4   3   2   1
      3                 4   3   2   1
      4             3   2   1
      5         2   1
      6     1
      7 for n = 5
      8 */
      9 
     10 #include <stdio.h>
     11 int main()
     12 {
     13     int i, j, k, n;
     14     printf("Enter n : ");
     15     scanf("%d", &n);
     16     for (i = n; i >= 1; i--)
     17     {
     18         for (j = 1; j <= i - 1; j++)
     19         {
     20             printf("\t");
     21         }
     22         for (k = i; k >= 1; k--)
     23         {
     24             printf("%d\t", k);
     25         }
     26         printf("\n");
     27     }
     28     return 0;
     29 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror