Symbolic Loop_1.11

#include <stdio.h>
int main (void)
{
    int i,j;
    for(i=1;i<=6;i++)
    {
       for(j=1;j<=i;j++)
       if(i%2==1)
       printf("*");
       else
       printf("#");
       printf("\n");
    }
    system("pause");
    return 0;
}


The Output is Given Below:
*
##
***
####
*****
######

0 comments:

Post a Comment