Menus

Thursday 6 February 2020

Printing Pattern in C



#include<stdio.h>

void main()
{

int l,i,j;

printf("Enter number of lines");
scanf("%d",&l);

for(i=1;i<=l;i++)
{
   for(j=1;j<=i;j++)
   { 
printf(" *");
   }  

   printf("\n");

}

}








No comments:

Post a Comment