/* Program to print the following output
#include <stdio.h>
int main()
{
int i, j,n;
printf("enter number=");
scanf("%d",&n);
for(i=1; i<=n; i++)
{
//Prints trailing spaces
/*for(j=i; j<n; j++)
{
printf(" ");
}*/
//Prints hollow right triangle
for(j=1; j<=(i*i); j++)
{
if(j==1||j==(i*i))
{
printf("*");
}
else
{
printf(" _ ");
}
}
printf("\n");
}
return 0;
}
*
*_ _*
*/#include <stdio.h>
int main()
{
int i, j,n;
printf("enter number=");
scanf("%d",&n);
for(i=1; i<=n; i++)
{
//Prints trailing spaces
/*for(j=i; j<n; j++)
{
printf(" ");
}*/
//Prints hollow right triangle
for(j=1; j<=(i*i); j++)
{
if(j==1||j==(i*i))
{
printf("*");
}
else
{
printf(" _ ");
}
}
printf("\n");
}
return 0;
}