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 / practice-c / pc001.c

pc001.c (362B)


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