#include<stdio.h>
main()
{
char prnt = '*';
int i, j, nos = 4, s;
clrscr();
for (i = 1; i <= 5; i++)
{
for (s = nos; s >= 1; s--)
{
printf(" ");
}
for (j = 1; j <= i; j++)
{
printf("%2c", prnt);
}
printf("\n");
--nos;
}
getch();
}
main()
{
char prnt = '*';
int i, j, nos = 4, s;
clrscr();
for (i = 1; i <= 5; i++)
{
for (s = nos; s >= 1; s--)
{
printf(" ");
}
for (j = 1; j <= i; j++)
{
printf("%2c", prnt);
}
printf("\n");
--nos;
}
getch();
}
No comments:
Post a Comment