Peramid in C Programming

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n;
clrscr();
printf(" n:");
scanf("%d",&n);
for (i=0;i<n;i++)
{
for (j=0;j<n-i-1;j++)
printf (" ");
for (j=0;j<2*i+1;j++)
printf("*");
printf("\n");
}

getch();


  • }

Post a Comment

0 Comments