// Program to calculate the triangle of star.
*
* *
* * *
* * * *
* * * * *
#include<stdio.h>
#include<conio.h>
main()
{
int x,i;
for(x=1;x<=5;x++)
{
for(i=1;i<=x;i++)
{
printf(" *");
}
printf("\n\n");
}
getch();
}
*
* *
* * *
* * * *
* * * * *
#include<stdio.h>
#include<conio.h>
main()
{
int x,i;
for(x=1;x<=5;x++)
{
for(i=1;i<=x;i++)
{
printf(" *");
}
printf("\n\n");
}
getch();
}
No comments:
Post a Comment