模拟

#include <iostream>
#include <string>
using namespace std; char numbers[][][] = {
{
' ', '-', ' ',
'|', ' ', '|',
' ', ' ', ' ',
'|', ' ', '|',
' ', '-', ' ',
},
{
' ', ' ', ' ',
' ', ' ', '|',
' ', ' ', ' ',
' ', ' ', '|',
' ', ' ', ' ',
},
{
' ', '-', ' ',
' ', ' ', '|',
' ', '-', ' ',
'|', ' ', ' ',
' ', '-', ' ',
},
{
' ', '-', ' ',
' ', ' ', '|',
' ', '-', ' ',
' ', ' ', '|',
' ', '-', ' ',
},
{
' ', ' ', ' ',
'|', ' ', '|',
' ', '-', ' ',
' ', ' ', '|',
' ', ' ', ' ',
},
{
' ', '-', ' ',
'|', ' ', ' ',
' ', '-', ' ',
' ', ' ', '|',
' ', '-', ' ',
},
{
' ', '-', ' ',
'|', ' ', ' ',
' ', '-', ' ',
'|', ' ', '|',
' ', '-', ' ',
},
{
' ', '-', ' ',
' ', ' ', '|',
' ', ' ', ' ',
' ', ' ', '|',
' ', ' ', ' ',
},
{
' ', '-', ' ',
'|', ' ', '|',
' ', '-', ' ',
'|', ' ', '|',
' ', '-', ' ',
},
{
' ', '-', ' ',
'|', ' ', '|',
' ', '-', ' ',
' ', ' ', '|',
' ', '-', ' ',
}
};
int size; void print(int line, char *se)
{
int i, j; for (i = ; i < strlen(se); i++)
{
cout << numbers[se[i] - ''][line][];
for (j = ; j < size; j++)
cout << numbers[se[i] - ''][line][];
cout << numbers[se[i] - ''][line][];
cout << " ";
}
cout << endl;
} void work()
{
char se[];
int i; cin >> se;
print(, se);
for (i = ; i < size; i++)
print(, se);
print(, se);
for (i = ; i < size; i++)
print(, se);
print(, se);
cout << endl;
} int main()
{
//freopen("t.txt", "r", stdin);
while (cin >> size && size != )
work();
return ;
}
05-11 22:43