diff --git a/C/stars_triangle.c b/C/stars_triangle.c new file mode 100644 index 0000000..fe5d360 --- /dev/null +++ b/C/stars_triangle.c @@ -0,0 +1,19 @@ +#include + +int main(void) +{ + int height; + printf("Enter the height of the stars triangle: "); + scanf("%d", &height); + + for (int i = 0; i < height; i++) + { + for (int j = 0; j <= i; j++) + { + printf("*"); + } + printf("\n"); + } + + return 0; +}