藜麦小笼包


私信TA

用户名:dotcpp0680909

访问量:857

签 名:

刁常潇

等  级
排  名 299
经  验 5603
参赛次数 0
文章发表 70
年  龄 18
在职情况 学生
学  校 山东管理学院
专  业 软件工程

  自我简介:

一名喜欢走捷径的程序猿

TA的其他文章

参考代码:

#include<bits/stdc++.h>
using namespace std;
string s1[3]={"   ","  |","  |"};
string s2[3]={" _ "," _|","|_ "};
string s3[3]={" _ "," _|"," _|"};
string s4[3]={"   ","|_|","  |"};
string s5[3]={" _ ","|_ "," _|"};
string s6[3]={" _ ","|_ ","|_|"};
string s7[3]={" _ ","  |","  |"};
string s8[3]={" _ ","|_|","|_|"};
string s9[3]={" _ ","|_|"," _|"};
string s0[3]={" _ ","| |","|_|"};
int main()
{
    int a,b,c,d;
    while(cin>>a>>b>>c>>d)
    {
        string s[3][4];
        switch(a)
        {
            case 0:
            {
                s[0][0]=s0[0];
                s[1][0]=s0[1];
                s[2][0]=s0[2];
            }break;
            case 1:
            {
                s[0][0]=s1[0];
                s[1][0]=s1[1];
                s[2][0]=s1[2];
            }break;
            case 2:
            {
                s[0][0]=s2[0];
                s[1][0]=s2[1];
                s[2][0]=s2[2];
            }break;
            case 3:
            {
                s[0][0]=s3[0];
                s[1][0]=s3[1];
                s[2][0]=s3[2];
            }break;
            case 4:
            {
                s[0][0]=s4[0];
                s[1][0]=s4[1];
                s[2][0]=s4[2];
            }break;
            case 5:
            {
                s[0][0]=s5[0];
                s[1][0]=s5[1];
                s[2][0]=s5[2];
            }break;
            case 6:
            {
                s[0][0]=s6[0];
                s[1][0]=s6[1];
                s[2][0]=s6[2];
            }break;
            case 7:
            {
                s[0][0]=s7[0];
                s[1][0]=s7[1];
                s[2][0]=s7[2];
            }break;
            case 8:
            {
                s[0][0]=s8[0];
                s[1][0]=s8[1];
                s[2][0]=s8[2];
            }break;
            case 9:
            {
                s[0][0]=s9[0];
                s[1][0]=s9[1];
                s[2][0]=s9[2];
            }break;
        }
        switch(b)
        {
            case 0:
            {
                s[0][1]=s0[0];
                s[1][1]=s0[1];
                s[2][1]=s0[2];
            }break;
            case 1:
            {
                s[0][1]=s1[0];
                s[1][1]=s1[1];
                s[2][1]=s1[2];
            }break;
            case 2:
            {
                s[0][1]=s2[0];
                s[1][1]=s2[1];
                s[2][1]=s2[2];
            }break;
            case 3:
            {
                s[0][1]=s3[0];
                s[1][1]=s3[1];
                s[2][1]=s3[2];
            }break;
            case 4:
            {
                s[0][1]=s4[0];
                s[1][1]=s4[1];
                s[2][1]=s4[2];
            }break;
            case 5:
            {
                s[0][1]=s5[0];
                s[1][1]=s5[1];
                s[2][1]=s5[2];
            }break;
            case 6:
            {
                s[0][1]=s6[0];
                s[1][1]=s6[1];
                s[2][1]=s6[2];
            }break;
            case 7:
            {
                s[0][1]=s7[0];
                s[1][1]=s7[1];
                s[2][1]=s7[2];
            }break;
            case 8:
            {
                s[0][1]=s8[0];
                s[1][1]=s8[1];
                s[2][1]=s8[2];
            }break;
            case 9:
            {
                s[0][1]=s9[0];
                s[1][1]=s9[1];
                s[2][1]=s9[2];
            }break;
        }
        switch(c)
        {
            case 0:
            {
                s[0][2]=s0[0];
                s[1][2]=s0[1];
                s[2][2]=s0[2];
            }break;
            case 1:
            {
                s[0][2]=s1[0];
                s[1][2]=s1[1];
                s[2][2]=s1[2];
            }break;
            case 2:
            {
                s[0][2]=s2[0];
                s[1][2]=s2[1];
                s[2][2]=s2[2];
            }break;
            case 3:
            {
                s[0][2]=s3[0];
                s[1][2]=s3[1];
                s[2][2]=s3[2];
            }break;
            case 4:
            {
                s[0][2]=s4[0];
                s[1][2]=s4[1];
                s[2][2]=s4[2];
            }break;
            case 5:
            {
                s[0][2]=s5[0];
                s[1][2]=s5[1];
                s[2][2]=s5[2];
            }break;
            case 6:
            {
                s[0][2]=s6[0];
                s[1][2]=s6[1];
                s[2][2]=s6[2];
            }break;
            case 7:
            {
                s[0][2]=s7[0];
                s[1][2]=s7[1];
                s[2][2]=s7[2];
            }break;
            case 8:
            {
                s[0][2]=s8[0];
                s[1][2]=s8[1];
                s[2][2]=s8[2];
            }break;
            case 9:
            {
                s[0][2]=s9[0];
                s[1][2]=s9[1];
                s[2][2]=s9[2];
            }break;
        }
        switch(d)
        {
            case 0:
            {
                s[0][3]=s0[0];
                s[1][3]=s0[1];
                s[2][3]=s0[2];
            }break;
            case 1:
            {
                s[0][3]=s1[0];
                s[1][3]=s1[1];
                s[2][3]=s1[2];
            }break;
            case 2:
            {
                s[0][3]=s2[0];
                s[1][3]=s2[1];
                s[2][3]=s2[2];
            }break;
            case 3:
            {
                s[0][3]=s3[0];
                s[1][3]=s3[1];
                s[2][3]=s3[2];
            }break;
            case 4:
            {
                s[0][3]=s4[0];
                s[1][3]=s4[1];
                s[2][3]=s4[2];
            }break;
            case 5:
            {
                s[0][3]=s5[0];
                s[1][3]=s5[1];
                s[2][3]=s5[2];
            }break;
            case 6:
            {
                s[0][3]=s6[0];
                s[1][3]=s6[1];
                s[2][3]=s6[2];
            }break;
            case 7:
            {
                s[0][3]=s7[0];
                s[1][3]=s7[1];
                s[2][3]=s7[2];
            }break;
            case 8:
            {
                s[0][3]=s8[0];
                s[1][3]=s8[1];
                s[2][3]=s8[2];
            }break;
            case 9:
            {
                s[0][3]=s9[0];
                s[1][3]=s9[1];
                s[2][3]=s9[2];
            }break;
        }
        for(int i=0;i<3;i++)
        {
            for(int j=0;j<4;j++)
            {
                cout<<s[i][j];
            }
            cout<<endl;
        }
    }
    return 0;
}


 

0.0分

0 人评分

  评论区

  • «
  • »