Description:
Print a right-angled triangle of stars.
Print a right-angled triangle of stars.
C Code
#include <stdio.h>
int main() {
for (int i = 1; i <= 5; i++) {
for (int j = 0; j < i; j++) printf("* ");
printf("\n");
}
return 0;
}
Expected Output
*
* *
* * *
* * * *
* * * * *