Write a program to construct the image shown below.
*********
********
*******
******
*****
****
***
**
*
#include <stdio.h>
#include <conio.h>
void main ( )
{
int i, j;
clrscr ( );
printf ("\n\t\t\t Triangle of star");
printf ("\n\n\n\t\t\t ");
for ( i = 9; i >= 1; i-- )
{
for ( j = 1; j <= i; j++)
{
printf (" *");
}
printf ("\n\t\t\t ");
}
getch ( );
}
Click here to contact us
*********
********
*******
******
*****
****
***
**
*
#include <stdio.h>
#include <conio.h>
void main ( )
{
int i, j;
clrscr ( );
printf ("\n\t\t\t Triangle of star");
printf ("\n\n\n\t\t\t ");
for ( i = 9; i >= 1; i-- )
{
for ( j = 1; j <= i; j++)
{
printf (" *");
}
printf ("\n\t\t\t ");
}
getch ( );
}
Click here to contact us
No comments:
Post a Comment