How to print inverse triangle in C ?

#include<stdio.h>
int main()
{
int i,j,n;
printf(“Enter N\n”);
scanf(“%d”,&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n-i;j++)
printf(“*”);
printf(“\n”);
}
}

Output of program-

Leave a Reply