11111
11110
11100
11000
10000
C语言
#include
void main()
{
int (i=0; i<5;i++){
for (j=0;j<5-i;j++) printf("1 ");
for (j=0;j printf("\n");}
}
VB:
For i = 1 To 5
For j = 1 To 5 - i + 1
Print "1 ";
Next j
For j = 1 To i - 1
Print "0 ";
Next j
Print
Next i