Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: asdasd
Problemset: ลูกเต๋า
Language: c
Time: 0.002 second
Submitted On: 2025-10-11 11:33:38
#include <stdio.h>
int main(){
char n[3];
scanf("%s",n);
char *one[3] = {" "," * "," "};
char *two[3] = {" ","* *"," "};
char *three[3] = {" * "," * "," * "};
char *four[3] = {"* *"," ","* *"};
char *five[3] = {"* *"," * ","* *"};
char *six[3] = {"* *","* *","* *"};
for(int i = 0 ; i<3 ; i++){
if(n[i]<'1'||n[i]>'6'){
printf("ERROR");
return 0;
}
}
for(int i = 0 ; i<3 ; i++){
for(int j = 0 ; j<3 ; j++){
if(j!=2){
if(n[j]=='1'){
printf("%s|",one[i]);
}
else if(n[j]=='2'){
printf("%s|",two[i]);
}
else if(n[j]=='3'){
printf("%s|",three[i]);
}
else if(n[j]=='4'){
printf("%s|",four[i]);
}
else if(n[j]=='5'){
printf("%s|",five[i]);
}
else if(n[j]=='6'){
printf("%s|",six[i]);
}
}
else{
if(n[j]=='1'){
printf("%s",one[i]);
}
else if(n[j]=='2'){
printf("%s",two[i]);
}
else if(n[j]=='3'){
printf("%s",three[i]);
}
else if(n[j]=='4'){
printf("%s",four[i]);
}
else if(n[j]=='5'){
printf("%s",five[i]);
}
else if(n[j]=='6'){
printf("%s",six[i]);
}
}
}
printf("\n");
}
}