Edit: I took John Bodes comment to form an answer.
# include <stdio.h>
int main()
{
char zero[][6] = {
"#####",
"# #",
"# #",
"# #",
"#####"
};
char one[][6] = {
" #",
" #",
" #",
" #",
" #"
};
char two[][6] = {
"#####",
" #",
"#####",
"# ",
"#####"
};
char three[][6] = {
"#####",
" #",
"#####",
" #",
"#####"
};
char four[][6] = {
"# #",
"# #",
"#####",
" #",
" #"
};
char five[][6] = {
"#####",
"# ",
"#####",
" #",
"#####"
};
char six[][6] = {
"#####",
"# ",
"#####",
"# #",
"#####"
};
char seven[][6] = {
"#####",
" #",
" #",
" #",
" #"
};
char eight[][6] = {
"#####",
"# #",
"#####",
"# #",
"#####"
};
char nine[][6] = {
"#####",
"# #",
"#####",
" #",
"#####"
};
//found another spot that's dangerous
char userInput[] = "356";
int n = 3,i,j;
for(i=0;i<5;i++)
{
for(j=0;j<n;j++)
{
switch(userInput[j])
{
case '0':
printf("%s ",zero[i]);
break;
case '1':
printf("%s ",one[i]);
break;
case '2':
printf("%s ",two[i]);
break;
case '3':
printf("%s ",three[i]);
break;
case '4':
printf("%s ",four[i]);
break;
case '5':
printf("%s ",five[i]);
break;
case '6':
printf("%s ",six[i]);
break;
case '7':
printf("%s ",seven[i]);
break;
case '8':
printf("%s ",eight[i]);
break;
case '9':
printf("%s ",nine[i]);
break;
}
}
printf("
");
}
}