bsc

Comprehensive codebase and coursework for the 4-year B.Sc. Computer Science Honours degree (WBSU)

git clone https://github.com/notamitgamer/bsc.git
· rebuilt hourlyOpen on GitHub
root / semester_1 / tuition-c / P047.c

P047.c (382B)


      1 /* Make this pattern for input n.
      2     Pattern :
      3     5
      4     5   4
      5     5   4   3
      6     5   4   3   2
      7     5   4   3   2   1
      8 */
      9 
     10 #include <stdio.h>
     11 
     12 int main()
     13 {
     14     int i, j, n;
     15     printf("Enter n : ");
     16     scanf("%d", &n);
     17     for (i = n; i >= 1; i--)
     18     {
     19         for (j = n; j >= i; j--)
     20         {
     21             printf("%d\t", j);
     22         }
     23         printf("\n");
     24     }
     25     return 0;
     26 }