1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 int main() 6 { 7 char t[10][3][3]={{' ','_',' ','|',' ','|','|','_','|'}, 8 {' ',' ',' ',' ',' ','|',' ',' ','|'}, 9 {' ','_',' ',' ','_','|','|','_',' '}, 10 {' ','_',' ',' ','_','|',' ','_','|'}, 11 {' ',' ',' ','|','_','|',' ',' ','|'}, 12 {' ','_',' ','|','_',' ',' ','_','|'}, 13 {' ','_',' ','|','_',' ','|','_','|'}, 14 {' ','_',' ',' ',' ','|',' ',' ','|'}, 15 {' ','_',' ','|','_','|','|','_','|'}, 16 {' ','_',' ','|','_','|',' ','_','|'}}; 17 int a,b,c,d,i,j,k; 18 while(scanf("%d%d%d%d",&a,&b,&c,&d)!=EOF) 19 { 20 for(j=0;j<3;j++) 21 { 22 for(k=0;k<3;k++) 23 printf("%c",t[a][j][k]); 24 for(k=0;k<3;k++) 25 printf("%c",t[b][j][k]); 26 for(k=0;k<3;k++) 27 printf("%c",t[c][j][k]); 28 for(k=0;k<3;k++) 29 printf("%c",t[d][j][k]); 30 printf(" "); 31 } 32 } 33 return 0; 34 }
我暴力打表了 郁闷啊 可以按照规律解