#include <stdio.h>

int main()
{
	int n, c, k, space, count = 1;
	printf("Enter the number of rows\n");
	scanf("%d", &n);

	space = n;

	for(c = 1; c <= n; c++) //goes through the entire process n times
	{
		for(k = 1; k < space; k++) //prints a blank space (space - 1) times
		{
			printf(" ");
		}
		for(k = 1; k <= c; k++)// I think of this as the columns
		{
			printf("*");

			if(c > 1 && count < c)
			{
				printf(" ");
				count++;
			}
		}

		printf("\n");
		space--;
		count = 1;
	}
}