fork(1) download
  1. #include <stdio.h>
  2. #include <ctype.h>
  3.  
  4. void wyswietl(char t[])
  5. {
  6. static const char *digits[3][10]=
  7. {
  8. {" _ "," "," _ "," _ "," "," _ "," _ "," _ "," _ "," _ "},
  9. {"| |"," |"," _|"," _|","|_|","|_ ","|_ "," |","|_|","|_|"},
  10. {"|_|"," |","|_ "," _|"," |"," _|","|_|"," |","|_|"," _|"}
  11. };
  12. for(unsigned y=0;y<3;++y)
  13. {
  14. for(unsigned i=0;t[i];++i) if(isdigit(t[i])) printf(" %s",digits[y][t[i]-'0']);
  15. printf("\n");
  16. }
  17. }
  18.  
  19.  
  20.  
  21. int main()
  22. {
  23. char tab[100];
  24. while((scanf("%99s",tab)==1)&&(tab[0])) wyswietl(tab);
  25. return 0;
  26. }
Success #stdin #stdout 0s 2252KB
stdin
1234
ala234ma56kot7a
310
9876543210
stdout
      _   _     
   |  _|  _| |_|
   | |_   _|   |
  _   _       _   _   _ 
  _|  _| |_| |_  |_    |
 |_   _|   |  _| |_|   |
  _       _ 
  _|   | | |
  _|   | |_|
  _   _   _   _   _       _   _       _ 
 |_| |_|   | |_  |_  |_|  _|  _|   | | |
  _| |_|   | |_|  _|   |  _| |_    | |_|