/*
* * * *
* * *
* *
*
*/
#include <stdio.h>
int main()
{
int i,j,n;
{
int i,j,n;
printf("Enter number: "); //to accept number from user
scanf("%d",&n);
scanf("%d",&n);
for(i=1;i<=n;i++) //outer loop is used to print rows
{
{
for(j=n;j>=i;j--) // inner loop is used to print columns
{
printf("* "); //to print *
}
{
printf("* "); //to print *
}
printf("\n"); // for go to the next line
}
}
return 0;
}
}
0 Comments