diff --git a/Patterns/Floyds-Triangle.c b/Patterns/Floyds-Triangle.c new file mode 100644 index 0000000..e604099 --- /dev/null +++ b/Patterns/Floyds-Triangle.c @@ -0,0 +1,14 @@ +#include +int main() { + int rows, i, j, number = 1; + printf("Enter the number of rows: "); + scanf("%d", &rows); + for (i = 1; i <= rows; i++) { + for (j = 1; j <= i; ++j) { + printf("%d ", number); + ++number; + } + printf("\n"); + } + return 0; +}