bsc

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

root / semester_1 / tuition-c / P049.c

P049.c (516B)


      1 /* Make this pattern for input n no of row.
      2     Pattern :
      3     #
      4     @   @
      5     #   #   #
      6     @   @   @   @
      7     #   #   #   #   #
      8     */
      9 
     10 #include <stdio.h>
     11 
     12 int main()
     13 {
     14     int i, j, n;
     15     char a = '#', b = '@';
     16     printf("Enter row number : ");
     17     scanf("%d", &n);
     18     for (i = 1; i <= n; i++)
     19     {
     20         for (j = 1; j <= i; j++)
     21         {
     22             if (i % 2 == 0)
     23                 printf("%c\t", b);
     24             else
     25                 printf("%c\t", a);
     26         }
     27         printf("\n");
     28     }
     29     return 0;
     30 }
© 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