====python=========
#!/usr/bin/env python
for i in range(1,9):
print "*" * i
========c=========
#include
#include
int main ( int argc, char *argv[] )
{
int i,j;
for (i=0;i<=7;i++) {
for (j=0;j<=i;j++) {
printf ("%s","*");
}
printf("\n");
}
return EXIT_SUCCESS;
}
=======两段代码输出的结果========
*
**
***
****
*****
******
*******
********
阅读(2473) | 评论(0) | 转发(0) |