Description
Your friend just bought a new computer, the most powerful computing tool he has ever used is a pocket calculator. Now, looking at his new computer, he is a little disappointed because he prefers the LC monitor on the calculator. So, you decided to write an LC display style program to help him display the numbers on the computer.
Input
The input includes several lines, each with two integers. The input is two 0 for the end, and the row is not processed.
Each line inputs two integers s and N, satisfies 1<=s<=10 and 0<=n<=99 999 999, where n is the number to be realistic, s is the size of n should be displayed (in multiples of magnification).
Output
The output number is LC display style: Use S "-" to denote horizontal lines and S "|" Vertical lines, where each number occupies just the s+2 column and the 2s+3 row, all without "-" and "|" Space, fill in the blanks. And there is a column of spaces between every two numbers.
Each line of input numbers corresponds to a set of LC display style outputs. The output of any two sets of numbers is separated by a blank line.
Sample Input
1#include <stdio.h>2 Chara[ A][Ten]= {"14041","03030","13121","13131","04130","12131","12141","13030","14141","14131"};3 voidPrintsCharCintN)4 {5 while(n--) Putchar (c);6 }7 intMain ()8 {9 intk=2;Ten Chars[ -]; One intfirst=1; A while(SCANF ("%d%s", &k,s) = =2&& (k| | s[0]!='0')) - { - if(!first) printf ("\ n");Elsefirst=0; the for(intI=0; i<5; i++) - { - intt=1; - for(intj=0; j<k; J + +) + { - for(intn=0; s[n]!=0; n++) + { A if(a[s[n]-'0'][i]=='1') at { - if(j) t=0; - Else{ -Putchar (' '); -Prints'-', k); -Putchar (' '); in if(s[n+1]!=0) Putchar (' '); - } to + } - Else if(a[s[n]-'0'][i]=='0') the { * if(j) t=0; $ Else{Panax NotoginsengPrints' ', K +2); - if(s[n+1]!=0) Putchar (' '); the } + } A Else the { + if(a[s[n]-'0'][i]=='2') - { $Putchar ('|'); $Prints' ', K +1); - } - Else if(a[s[n]-'0'][i]=='3') the { -Prints' ', K +1);WuyiPutchar ('|'); the } - Else if(a[s[n]-'0'][i]=='4') Wu { -Putchar ('|'); AboutPrints' ', k); $Putchar ('|'); - } - if(s[n+1]!=0) Putchar (' '); - } A } + if(t) Putchar ('\ n'); the } - } $ } the return 0; the}
Sdust operation problem I LCD display