different types of half pyramids program in c code example
Example: half pyramid in c
#include <stdio.h>
#define N 5
int main()
{
int i,j;
for(i=1;i<=N;i++)
{
for(j=1;j<=i;j++)
printf("*");
printf("\n");
}
return 0;
}
#include <stdio.h>
#define N 5
int main()
{
int i,j;
for(i=1;i<=N;i++)
{
for(j=1;j<=i;j++)
printf("*");
printf("\n");
}
return 0;
}