1
2 3
4 5 6
7 8 9 10
------------------------------------------------------------------------------------------------------------------------------
#include <stdio.h>
int main()
{
int rows=5,coef=1, space, i, j;
for (i = 1; i < rows; i++) {
for (space = 1; space <= rows- i; space++)
printf(" ");
for (j = 1; j <=i; ++j)
{
printf("%4d", coef);
++coef;
}
printf("\n");
}
return 0;
}
Comments
Post a Comment