Language: C

#include <stdio.h>
#include <string.h>

int n, i;
char mozi[6];
int me;

int main(){
	int sum, saikkoro1, ssaikoro2, saikoro3;
	while(1){
		scanf("%d", &n);
		
		if(n==0){
			break;
		}
		saikoro1 = 1;
		saikoro2 = 2;
		saikoro3 = 3;
		sum = saikoro1;
		for(i=0; i<n; i++){
			scanf("%s",mozi);
			if(strcmp('North', mozi) == 0){
				me = 7 -saikoro1;
				saikoro1 = saikoro2;
				saikoro2 = me;
			}
			if(strcmp('East', mozi) == 0){
				me = 7 -saikoro1
				saikoro3 = saikoro1;
				saikoro1 = me;
			}
			if(strcmp('West',mozi) == 0){
				me = 7 - saikoro1;
				saikoro1 = saikoro3;
				saikoro3 = me;
			}
			if(strcmp('South',mozi) == 0){
				me = 7 - saikoro2
				saikoro2 = saikoro1;
				saikoro1 = me;
			}
			if(strcmp('Right',mozi) == 0){
				me = 7 - saikoro2;
				saikoro2 = saikoro3;
				saikoro3 = me;
			}
			if(strcmp('Left', mozi) == 0){
				me = 7 -saikoro3;
				saikoro3 = saikoro2;
				saikoro2 = me;
			}
			sum += siakoro1;
		}
		printf("%d\n", sum);
		
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:17: error: 'saikoro1' undeclared (first use in this function); did you mean 'saikoro3'?
   16 |                 saikoro1 = 1;
      |                 ^~~~~~~~
      |                 saikoro3
main.c:16:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:17: error: 'saikoro2' undeclared (first use in this function); did you mean 'saikoro3'?
   17 |                 saikoro2 = 2;
      |                 ^~~~~~~~
      |                 saikoro3
main.c:22:35: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   22 |                         if(strcmp('North', mozi) == 0){
      |                                   ^~~~~~~
main.c:22:35: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   22 |                         if(strcmp('North', mozi) == 0){
      |                                   ^~~~~~~
      |                                   |
      |                                   int
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:27:35: warning: multi-character character constant [-Wmultichar]
   27 |                         if(strcmp('East', mozi) == 0){
      |                                   ^~~~~~
main.c:27:35: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   27 |                         if(strcmp('East', mozi) == 0){
      |                                   ^~~~~~
      |                                   |
      |                                   int
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:28:49: error: expected ';' before 'saikoro3'
   28 |                                 me = 7 -saikoro1
      |                                                 ^
      |                                                 ;
   29 |                                 saikoro3 = saikoro1;
      |                                 ~~~~~~~~         
main.c:32:35: warning: multi-character character constant [-Wmultichar]
   32 |                         if(strcmp('West',mozi) == 0){
      |                                   ^~~~~~
main.c:32:35: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   32 |                         if(strcmp('West',mozi) == 0){
      |                                   ^~~~~~
      |                                   |
      |                                   int
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:37:35: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   37 |                         if(strcmp('South',mozi) == 0){
      |                                   ^~~~~~~
main.c:37:35: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   37 |                         if(strcmp('South',mozi) == 0){
      |                                   ^~~~~~~
      |                                   |
      |                                   int
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:38:50: error: expected ';' before 'saikoro2'
   38 |                                 me = 7 - saikoro2
      |                                                  ^
      |                                                  ;
   39 |                                 saikoro2 = saikoro1;
      |                                 ~~~~~~~~          
main.c:42:35: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   42 |                         if(strcmp('Right',mozi) == 0){
      |                                   ^~~~~~~
main.c:42:35: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   42 |                         if(strcmp('Right',mozi) == 0){
      |                                   ^~~~~~~
      |                                   |
      |                                   int
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:47:35: warning: multi-character character constant [-Wmultichar]
   47 |                         if(strcmp('Left', mozi) == 0){
      |                                   ^~~~~~
main.c:47:35: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   47 |                         if(strcmp('Left', mozi) == 0){
      |                                   ^~~~~~
      |                                   |
      |                                   int
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:52:32: error: 'siakoro1' undeclared (first use in this function); did you mean 'saikoro3'?
   52 |                         sum += siakoro1;
      |                                ^~~~~~~~
      |                                saikoro3