C programme to print pyramid
C program to print pyramid
=================================
#include<stdio.h>
#include<conio.h>
void main()
{ clrscr();
int a,b,c;
for(a=1;a<=5;a++)
{
for(c=5;c>a;c--)
{printf(" ");}
for(b=1;b<a;b++)
{
printf("* ");}
printf("*\n");}
getch();}
=======================================
Comments
Post a Comment