题目链接:https://ac.2333.moe/Problem/view.xhtml?id=1219
#include<iostream>
#include<cstdio>
using namespace std;
char numb[11][3][3]= {{{' ','_',' '},{'|',' ','|'},{'|','_','|'}},
{{' ',' ',' '},{' ',' ','|'},{' ',' ','|'}},
{{' ','_',' '},{' ','_','|'},{'|','_',' '}},
{{' ','_',' '},{' ','_','|'},{' ','_','|'}},
{{' ',' ',' '},{'|','_','|'},{' ',' ','|'}},
{{' ','_',' '},{'|','_',' '},{' ','_','|'}},
{{' ','_',' '},{'|','_',' '},{'|','_','|'}},
{{' ','_',' '},{' ',' ','|'},{' ',' ','|'}},
{{' ','_',' '},{'|','_','|'},{'|','_','|'}},
{{' ','_',' '},{'|','_','|'},{' ','_','|'}}
};
int main()
{
int a,b,c,d;
while(scanf("%d %d %d %d",&a,&b,&c,&d)==4)
{
for(int i=0; i<3; i++)
{
for(int j=0; j<3; j++)
{
cout<<numb[a][i][j];
}
for(int j=0; j<3; j++)
{
cout<<numb[b][i][j];
}
for(int j=0; j<3; j++)
{
cout<<numb[c][i][j];
}
for(int j=0; j<3; j++)
{
cout<<numb[d][i][j];
}
cout<<endl;
}
}
return 0;
}
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/qq_30076791/article/details/47749061