1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 int i = 1, j = 1; 7 for(; i <= 5; i++) 8 { 9 for(j = 1; j <= 5 - i; j++) 10 { 11 printf("%s", " "); 12 } 13 for(j = 1; j <= 2 * i - 1; j++) 14 { 15 printf("%s", "* "); 16 } 17 printf("\n"); 18 } 19 printf("Hello world!\n"); 20 return 0; 21 }
转载于:https://www.cnblogs.com/mender/archive/2013/03/17/2965206.html