Why !!!?
[c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
static char map[10][5][4]={
{" - ",
"| |",
" ",
"| |",
" - "},
{" ",
" |",
" ",
" |",
" "},
{" - ",
" |",
" - ",
"| ",
" - "},
{" - ",
" |",
" - ",
" |",
" - "},
{" ",
"| |",
" - ",
" |",
" "},
{" - ",
"| ",
" - ",
" |",
" - "},
{" - ",
"| ",
" - ",
"| |",
" - "},
{"-- ",
" |",
" ",
" |",
" "},
{" - ",
"| |",
" - ",
"| |",
" - "},
{" - ",
"| |",
" - ",
" |",
" - "}
};
void do_display(int n, char *nb)
{
int i, j, k;
int l=strlen(nb);
for(i=0; i<l;i++)
{
putchar(map[( nb[i]-'0')][0][0]);
for(j=0; j<n; j++)
putchar(map[( nb[i]-'0')][0][1]);
putchar(map[( nb[i]-'0')][0][2]);
if(i!=l-1)
putchar(' ');
}
putchar('\n');
for(i=0; i<n; i++)
{
for(j=0; j<l; j++)
{
putchar(map[( nb[j]-'0')][1][0]);
for(k=0; k<n; k++)
putchar(map[( nb[j]-'0')][1][1]);
putchar(map[( nb[j]-'0')][1][2]);
if(j!=l-1)
putchar(' ');
}
putchar('\n');
}
for(i=0; i<l; i++)
{
putchar(map[( nb[i]-'0')][2][0]);
for(j=0; j<n; j++)
putchar(map[( nb[i]-'0')][2][1]);
putchar(map[( nb[i]-'0')][2][2]);
if(i!=l-1)
putchar(' ');
}
putchar('\n');
for(i=0; i<n; i++)
{
for(j=0; j<l; j++)
{
putchar(map[( nb[j]-'0')][3][0]);
for(k=0; k<n; k++)
putchar(map[( nb[j]-'0')][3][1]);
putchar(map[( nb[j]-'0')][3][2]);
if(j!=l-1)
putchar(' ');
}
putchar('\n');
}
for(i=0; i<l; i++)
{
putchar(map[( nb[i]-'0')][4][0]);
for(j=0; j<n; j++)
putchar(map[( nb[i]-'0')][4][1]);
putchar(map[( nb[i]-'0')][4][2]);
if(i!=l-1)
putchar(' ');
}
putchar('\n');
}
int main()
{
int s;
char nb[20];
while(2==fscanf(stdin, "%d %s", &s, nb))
{
if(!s)
break;
do_display(s, nb);
putchar('\n');
}
return EXIT_SUCCESS;
}
[/c]