Language: C

#include<stdio.h>

struct dice{
            int a[6];
            int top[24];
            int mae[24];
            };
dice dice1;

int main(){
       int i,n;
       for(i=0;i<6;i++){
                        scanf("%d",dice1.&a[i]);
                        }
       scanf("%d",&n);
       for(i=0;i<n;i++){
                        scanf("%d%d",&dice1.top[i],&dice1.mae[i]);
                        
                         if(dice1.a[0]==dice1.top[0]){
                                    if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[2]);
                                    if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[4]);
                                    if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[3]);
                                    if(dice1.a[1]==dice1.mae[3])printf("%d\n",dice1.a[1]);
                                                      }
                         if(dice1.a[0]==dice1.top[1]){
                                    if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[2]);
                                    if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[0]);
                                    if(dice1.a[1]==dice1.mae[0])printf("%d\n",dice1.a[3]);
                                    if(dice1.a[1]==dice1.mae[3])printf("%d\n"&dice1.a[5]);
                                                      }
                         if(dice1.a[0]==dice1.top[2]){
                                    if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[5]);
                                    if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[4]);
                                    if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[0]);
                                    if(dice1.a[1]==dice1.mae[0])printf("%d\n",dice1.a[1]);
                                                      }
                         if(dice1.a[0]==dice1.top[3]){
                                    if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[0]);
                                    if(dice1.a[1]==dice1.mae[0])printf("%d\n",dice1.a[4]);
                                    if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[5]);
                                    if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[1]);
                                                      }
                         if(dice1.a[0]==dice1.top[4]){
                                    if(dice1.a[1]==dice1.mae[0])printf("%d\n",dice1.a[3]);
                                    if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[0]);
                                    if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[2]);
                                    if(dice1.a[1]==dice1.mae[3])printf("%d\n",dice1.a[5]);
                                                      }
                         if(dice1.a[0]==dice1.top[5]){
                                    if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[1]);
                                    if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[3]);
                                    if(dice1.a[1]==dice1.mae[3])printf("%d\n",dice1.a[4]);
                                    if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[2]);
                                                      }
                        }
   return 0;
}



Compiler output:
main.c:8:1: error: unknown type name 'dice'; use 'struct' keyword to refer to the type
    8 | dice dice1;
      | ^~~~
      | struct 
main.c: In function 'main':
main.c:13:42: error: expected identifier before '&' token
   13 |                         scanf("%d",dice1.&a[i]);
      |                                          ^
main.c:17:44: error: request for member 'top' in something not a structure or union
   17 |                         scanf("%d%d",&dice1.top[i],&dice1.mae[i]);
      |                                            ^
main.c:17:58: error: request for member 'mae' in something not a structure or union
   17 |                         scanf("%d%d",&dice1.top[i],&dice1.mae[i]);
      |                                                          ^
main.c:19:34: error: request for member 'a' in something not a structure or union
   19 |                          if(dice1.a[0]==dice1.top[0]){
      |                                  ^
main.c:19:46: error: request for member 'top' in something not a structure or union
   19 |                          if(dice1.a[0]==dice1.top[0]){
      |                                              ^
main.c:20:45: error: request for member 'a' in something not a structure or union
   20 |                                     if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[2]);
      |                                             ^
main.c:20:57: error: request for member 'mae' in something not a structure or union
   20 |                                     if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[2]);
      |                                                         ^
main.c:20:84: error: request for member 'a' in something not a structure or union
   20 |                                     if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[2]);
      |                                                                                    ^
main.c:21:45: error: request for member 'a' in something not a structure or union
   21 |                                     if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[4]);
      |                                             ^
main.c:21:57: error: request for member 'mae' in something not a structure or union
   21 |                                     if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[4]);
      |                                                         ^
main.c:21:84: error: request for member 'a' in something not a structure or union
   21 |                                     if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[4]);
      |                                                                                    ^
main.c:22:45: error: request for member 'a' in something not a structure or union
   22 |                                     if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[3]);
      |                                             ^
main.c:22:57: error: request for member 'mae' in something not a structure or union
   22 |                                     if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[3]);
      |                                                         ^
main.c:22:84: error: request for member 'a' in something not a structure or union
   22 |                                     if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[3]);
      |                                                                                    ^
main.c:23:45: error: request for member 'a' in something not a structure or union
   23 |                                     if(dice1.a[1]==dice1.mae[3])printf("%d\n",dice1.a[1]);
      |                                             ^
main.c:23:57: error: request for member 'mae' in something not a structure or union
   23 |                                     if(dice1.a[1]==dice1.mae[3])printf("%d\n",dice1.a[1]);
      |                                                         ^
main.c:23:84: error: request for member 'a' in something not a structure or union
   23 |                                     if(dice1.a[1]==dice1.mae[3])printf("%d\n",dice1.a[1]);
      |                                                                                    ^
main.c:25:34: error: request for member 'a' in something not a structure or union
   25 |                          if(dice1.a[0]==dice1.top[1]){
      |                                  ^
main.c:25:46: error: request for member 'top' in something not a structure or union
   25 |                          if(dice1.a[0]==dice1.top[1]){
      |                                              ^
main.c:26:45: error: request for member 'a' in something not a structure or union
   26 |                                     if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[2]);
      |                                             ^
main.c:26:57: error: request for member 'mae' in something not a structure or union
   26 |                                     if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[2]);
      |                                                         ^
main.c:26:84: error: request for member 'a' in something not a structure or union
   26 |                                     if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[2]);
      |                                                                                    ^
main.c:27:45: error: request for member 'a' in something not a structure or union
   27 |                                     if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[0]);
      |                                             ^
main.c:27:57: error: request for member 'mae' in something not a structure or union
   27 |                                     if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[0]);
      |                                                         ^
main.c:27:84: error: request for member 'a' in something not a structure or union
   27 |                                     if(dice1.a[1]==dice1.mae[2])printf("%d\n",dice1.a[0]);
      |                                                                                    ^
main.c:28:45: error: request for member 'a' in something not a structure or union
   28 |                                     if(dice1.a[1]==dice1.mae[0])printf("%d\n",dice1.a[3]);
      |                                             ^
main.c:28:57: error: request for member 'mae' in something not a structure or union
   28 |                                     if(dice1.a[1]==dice1.mae[0])printf("%d\n",dice1.a[3]);
      |                                                         ^
main.c:28:84: error: request for member 'a' in something not a structure or union
   28 |                                     if(dice1.a[1]==dice1.mae[0])printf("%d\n",dice1.a[3]);
      |                                                                                    ^
main.c:29:45: error: request for member 'a' in something not a structure or union
   29 |                                     if(dice1.a[1]==dice1.mae[3])printf("%d\n"&dice1.a[5]);
      |                                             ^
main.c:29:57: error: request for member 'mae' in something not a structure or union
   29 |                                     if(dice1.a[1]==dice1.mae[3])printf("%d\n"&dice1.a[5]);
      |                                                         ^
main.c:29:84: error: request for member 'a' in something not a structure or union
   29 |                                     if(dice1.a[1]==dice1.mae[3])printf("%d\n"&dice1.a[5]);
      |                                                                                    ^
main.c:31:34: error: request for member 'a' in something not a structure or union
   31 |                          if(dice1.a[0]==dice1.top[2]){
      |                                  ^
main.c:31:46: error: request for member 'top' in something not a structure or union
   31 |                          if(dice1.a[0]==dice1.top[2]){
      |                                              ^
main.c:32:45: error: request for member 'a' in something not a structure or union
   32 |                                     if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[5]);
      |                                             ^
main.c:32:57: error: request for member 'mae' in something not a structure or union
   32 |                                     if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[5]);
      |                                                         ^
main.c:32:84: error: request for member 'a' in something not a structure or union
   32 |                                     if(dice1.a[1]==dice1.mae[1])printf("%d\n",dice1.a[5]);
      |                                                                                    ^
main.c:33:45: error: request for member 'a' in something not a structure or union
   33 |                                     if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[4]);
      |                                             ^
main.c:33:57: error: request for member 'mae' in something not a structure or union
   33 |                                     if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[4]);
      |                                                         ^
main.c:33:84: error: request for member 'a' in something not a structure or union
   33 |                                     if(dice1.a[1]==dice1.mae[5])printf("%d\n",dice1.a[4]);
      |                                                                                    ^
main.c:34:45: error: request for member 'a' in something not a structure or union
   34 |                                     if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[0]);
      |                                             ^
main.c:34:57: error: request for member 'mae' in something not a structure or union
   34 |                                     if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[0]);
      |                                                         ^
main.c:34:84: error: request for member 'a' in something not a structure or union
   34 |                                     if(dice1.a[1]==dice1.mae[4])printf("%d\n",dice1.a[0]);
      |