Language: C

#include<stdio.h>
#include<math.h>


struct dice{
            int n[6];
            }

struct dice dice1;

void e(){
         int buff=0;
         buff=dice1.n[0];
         dice1.n[0]=dice1.n[3];
         dice1.n[3]=dice1.n[5];
         dice1.n[5]=dice1.n[2];
         dice1.n[2]=buff;
         }

void s(){
         int buff=0;
         buff=dice1.n[0];
         dice1.n[0]=dice1.n[4];
         dice1.n[4]=dice1.n[5];
         dice1.n[5]=dice1.n[1];
         dice1.n[1]=buff;
         }

void w(){
         int buff=0;
         buff=dice1.n[0];
         dice1.n[0]=dice1.n[2];
         dice1.n[2]=dice1.n[5];
         dice1.n[5]=dice1.n[3];
         dice1.n[3]=buff;
         }

void n(){
         int buff=0;
         buff=dice1.n[0];
         dice1.n[0]=dice1.n[1];
         dice1.n[1]=dice1.n[5];
         dice1.n[5]=dice1.n[4];
         dice1.n[4]=buff;
         }

int main(){
           int me[6],i;
           char muki;
           for(;;){
                   for(i=0;i<6;i++){
                           scanf("%d",&me[i]);
                           dice1.n[i]=me[i];
                                    }
                   for(i=0;i<100;i++){
                                      scanf("%c",&muki);
                                      if(strcmp(muki,"\n")==0)break;
                                      if(strcmp(muki,"E")==0)e();
                                      if(strcmp(muki,"S")==0)s();
                                      if(strcmp(muki,"W")==0)w();
                                      if(strcmp(muki,"N")==0)n();
                                      }
                    printf("%d",dice1.n[0]);
                    }
               return 0;
              }



Compiler output:
main.c:9:1: error: expected ';', identifier or '(' before 'struct'
    9 | struct dice dice1;
      | ^~~~~~
main.c: In function 'main':
main.c:57:42: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   57 |                                       if(strcmp(muki,"\n")==0)break;
      |                                          ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    2 | #include<math.h>
  +++ |+#include <string.h>
    3 | 
main.c:57:49: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   57 |                                       if(strcmp(muki,"\n")==0)break;
      |                                                 ^~~~
      |                                                 |
      |                                                 char
main.c:57:49: note: expected 'const char *' but argument is of type 'char'
main.c:58:49: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   58 |                                       if(strcmp(muki,"E")==0)e();
      |                                                 ^~~~
      |                                                 |
      |                                                 char
main.c:58:49: note: expected 'const char *' but argument is of type 'char'
main.c:59:49: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   59 |                                       if(strcmp(muki,"S")==0)s();
      |                                                 ^~~~
      |                                                 |
      |                                                 char
main.c:59:49: note: expected 'const char *' but argument is of type 'char'
main.c:60:49: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   60 |                                       if(strcmp(muki,"W")==0)w();
      |                                                 ^~~~
      |                                                 |
      |                                                 char
main.c:60:49: note: expected 'const char *' but argument is of type 'char'
main.c:61:49: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   61 |                                       if(strcmp(muki,"N")==0)n();
      |                                                 ^~~~
      |                                                 |
      |                                                 char
main.c:61:49: note: expected 'const char *' but argument is of type 'char'