1 2 3 4 5 6 7 8 9 10
#include <stdio.h>
int main (int argc, const char * argv[])
{
int print=1;
for (int i=0; i<=3; i++)
{
for (int j=4-i; j>=1; j--)
{
printf(" ");
}
for (int k=0; k<=i; k++)
{
printf(" %d",print);
printf(" ");
printf(" ");
print++;
}
printf("\n");
}
return 0;
}
0 comments:
Post a Comment