输出三角形

#include <stdio.h>

int main(void)
{
        int line,i,n,star,space;

        scanf("%d",&line);

        space = line;

        for(i=0;i<line;i++)
        {
                star = i*2 + 1;

                for(n=0;n<space;n++)
                {
                        printf(" ");
                }
                --space;

                for(n = 0;n<star;n++)
                {
                        printf("*");
                }
                printf("\n");
        }


        return 0;
}