criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>

struct DICE {
int mark1,mark2,mark3,mark4,mark5,mark6;
};

void MoveDice(struct DICE *p,char c);
void SpinDice(struct DICE *p,char c);

int main(){
struct DICE p;int cnt,flag,up,ahead,num,i;

scanf("%d %d %d %d %d %d\n",&p.mark1,&p.mark2,&p.mark3,&p.mark4,&p.mark5,&p.mark6);
scanf("%d\n", &num);
i=1;
while(i<=num){
 scanf("%d %d\n",&up,&ahead);
 cnt=0;flag=0;

 while(flag==0)){
  if((p.mark1==up)||(cnt==3)){
   flag==1;
  }else{
   MoveDice(&p,'W');
   cnt++;
  }
 }
 if(flag==0){
  MoveDice(&p,'N'); 
  if(p.mark1==up){
   flag==1;
  }else{
  MoveDice(&p,'N'); 
  MoveDice(&p,'N'); 
  flag==1; 
  }
 }
 cnt=0;flag=0;
 while(cnt<=3||flag==0){
  if(p.mark2==ahead){
   flag==1;
  }else{
   SpinDice(&p,'R');
   cnt++;
  }
 }
printf("%d\n",p.mark3);
i++;
}

return 0;
}

void MoveDice(struct DICE *p,char c){
int tmp;
tmp=p->mark1;
switch(c){
case 'W':
p->mark1=p->mark3;p->mark3=p->mark6;p->mark6=p->mark4;p->mark4=tmp;
break;
case 'E':
p->mark1=p->mark4;p->mark4=p->mark6;p->mark6=p->mark3;p->mark3=tmp;
break;
case 'N':
p->mark1=p->mark2;p->mark2=p->mark6;p->mark6=p->mark5;p->mark5=tmp;
break;
case 'S':
p->mark1=p->mark5;p->mark5=p->mark6;p->mark6=p->mark2;p->mark2=tmp;
break;
}
}
void SpinDice(struct DICE *p,char c){
if (c=='R'){
MoveDice(p,'W');
MoveDice(p,'S');
MoveDice(p,'E');
}else{
MoveDice(p,'W');
MoveDice(p,'N');
MoveDice(p,'E');
}
}

Compiler output:
main.c: In function 'main':
main.c:20:16: error: expected statement before ')' token
   20 |  while(flag==0)){
      |                ^
Language: C

#include <stdio.h>

struct DICE {
int mark1,mark2,mark3,mark4,mark5,mark6;
};

void MoveDice(struct DICE *p,char c);
void SpinDice(struct DICE *p,char c);

int main(){
struct DICE p;int cnt,flag,up,ahead,num,i;

scanf("%d %d %d %d %d %d\n",&p.mark1,&p.mark2,&p.mark3,&p.mark4,&p.mark5,&p.mark6);
scanf("%d\n", &num);
i=1;
while(i<=num){
 scanf("%d %d\n",&up,&ahead);
 cnt=0;flag=0;

 while((flag==0)&&(cnt<=3))cnt{
  if(p.mark1==up){
   flag==1;
  }else{
   MoveDice(&p,'W');
   cnt++;
  }
 }
 if(flag==0){
  MoveDice(&p,'N'); 
  if(p.mark1==up){
   flag==1;
  }else{
   MoveDice(&p,'N'); 
   MoveDice(&p,'N'); 
   flag==1; 
  }
 }
 cnt=0;flag=0;
 while(flag==0){
  if(p.mark2==ahead){
   flag==1;
  }else{
   SpinDice(&p,'R');
  }
 }
printf("%d\n",p.mark3);
i++;
}

return 0;
}

void MoveDice(struct DICE *p,char c){
int tmp;
tmp=p->mark1;
switch(c){
case 'W':
p->mark1=p->mark3;p->mark3=p->mark6;p->mark6=p->mark4;p->mark4=tmp;
break;
case 'E':
p->mark1=p->mark4;p->mark4=p->mark6;p->mark6=p->mark3;p->mark3=tmp;
break;
case 'N':
p->mark1=p->mark2;p->mark2=p->mark6;p->mark6=p->mark5;p->mark5=tmp;
break;
case 'S':
p->mark1=p->mark5;p->mark5=p->mark6;p->mark6=p->mark2;p->mark2=tmp;
break;
}
}
void SpinDice(struct DICE *p,char c){
if (c=='R'){
MoveDice(p,'W');
MoveDice(p,'S');
MoveDice(p,'E');
}else{
MoveDice(p,'W');
MoveDice(p,'N');
MoveDice(p,'E');
}
}

Compiler output:
main.c: In function 'main':
main.c:20:31: error: expected ';' before '{' token
   20 |  while((flag==0)&&(cnt<=3))cnt{
      |                               ^
      |                               ;
Language: C

#include <stdio.h>

struct DICE {
int mark1,mark2,mark3,mark4,mark5,mark6;
};

void MoveDice(struct DICE *p,char c);
void SpinDice(struct DICE *p,char c);

int main(){
struct DICE p;int cnt,flagup,flagah,up,ahead,num,i;

scanf("%d %d %d %d %d %d",&p.mark1,&p.mark2,&p.mark3,&p.mark4,&p.mark5,&p.mark6);
scanf("%d", &num);
i=1;
while(i<=num){
 scanf("%d %d",&up,&ahead);
 cnt=0;flagup=0;

 while((flagup==0)&&(cnt<=3)){
  if(p.mark1==up){
   flagup=1;
  }else{
   MoveDice(&p,'W');
   cnt++;
  }
 }
 if(flagup==0){
  MoveDice(&p,'N');
  if(p.mark1==up){
   flagup=1;
  }else{
   MoveDice(&p,'N');
   MoveDice(&p,'N');
   flagup=1;
  }
 }

Compiler output:
main.c: In function 'main':
main.c:37:2: error: expected declaration or statement at end of input
   37 |  }
      |  ^
main.c:37:2: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
 
typedef struct {
    short surf[6];
    short top;
} dice;
 
dice dice1;
 
int main(void){
 
    char command;
    short trade;
    register short i;
 
    for(i = 0;i < 6;i++){
        scanf("%d",->dice1.surf[i]);
    }
 
    dice1.top = dice1.surf[0];
    while(1){
        scanf("%c",command);
        if(command == '\0'){
            break;
        }
        switch (command){
            case 'E':
                trade = dice1.surf[0];
                dice1.surf[0] = dice1.surf[3];
                dice1.surf[3] = dice1.surf[5];
                dice1.surf[5] = dice1.surf[2];
                dice1.surf[2] = trade;
                break;
            case 'N':
                trade = dice1.surf[0];
                dice1.surf[0] = dice1.surf[1];
                dice1.surf[1] = dice1.surf[5];
                dice1.surf[5] = dice1.surf[4];
                dice1.surf[4] = trade;
                break;
            case 'S':
                trade = dice1.surf[0];
                dice1.surf[0] = dice1.surf[4];
                dice1.surf[4] = dice1.surf[5];
                dice1.surf[5] = dice1.surf[1];
                dice1.surf[1] = trade;
                break;
            case 'W':
                trade = dice1.surf[0];
                dice1.surf[0] = dice1.surf[2];
                dice1.surf[2] = dice1.surf[5];
                dice1.surf[5] = dice1.surf[4];
                dice1.surf[4] = trade;
                break;
            default:
                break;
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:20: error: expected expression before '->' token
   17 |         scanf("%d",->dice1.surf[i]);
      |                    ^~
Language: C

#include <iostream>
#include <stdio.h>
using namespace std;
const int UP=0;
const int FLOMT=1;
const int RIGHT=2;
const int LEFT=3;
const int BACK=4;
const int DOWN=5;
class Dice{
 public:
  Dice();~Dice();
  int num[6];
  void set_num(int n,int i);
  void spin(char c);
  int get_num(int n);
};
Dice::Dice(){}
Dice::~Dice(){}
void Dice::set_num(int n,int i){num[i]=n;}
int Dice::get_num(int n){return num[n];}
void Dice::spin(char c){
  int temp;
  if(c=='S'){
    temp=num[0];
    num[0]=num[4];
    num[4]=num[5];
    num[5]=num[2];
    num[1]=temp;
  }if(c=='N'){
    temp=num[0];
    num[0]=num[1];
    num[1]=num[5];
    num[5]=num[4];
    num[4]=temp;
  }if(c=='W'){
    temp=num[0];
    num[0]=num[2];
    num[2]=num[5];
    num[5]=num[3];
    num[3]=temp;
  }if(c=='E'){
    temp=num[0];
    num[0]=num[3];
    num[3]=num[5];
    num[5]=num[2];
    num[2]=temp;
  }
}

int main(){
  char c[102];
  Dice *m_Dice;
  m_Dice=new Dice;
  for(int i=0; i<6; i++){
    int n;
    cin>>n;
    m_Dice->set_num(n,i);
  }
  cin>>c;
  for(int i=0; i<102; i++){
    if(c[i]!='\0')m_Dice->spin(c[i]);
    else break;
  }
  cout<<m_Dice->get_num(0)<<endl;
  delete m_Dice;
  return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

//#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
DICE assignment( DICE *t);
void input_char(char *t);
DICE North( DICE *t);
DICE Sorth( DICE *t);
DICE East( DICE *t);
DICE West( DICE *t);
DICE temp;
char temp_sentence[100];
int main()
{
	int i;
	char word[100];
	DICE Dice1 =assignment(&temp);
	input_char(word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	return 0;
}
void input_char(char *temp_sentence){
	scanf("%s",temp_sentence);
}
DICE assignment(DICE *t){
	int i,as,a[6];
	for (i = 0; i < 6; i++){
		scanf("%d", &as);
		a[i] = as;
	}
	temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
	return temp;
}
DICE North( DICE *t){
	temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth( DICE *t){
	temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
	return temp;
}
DICE East( DICE *t){
	temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West( DICE *t){
	temp = { t->East, t->Sorth, t->Up, t->Down, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'assignment':
main.c:50:16: error: expected expression before '{' token
   50 |         temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
      |                ^
main.c: In function 'North':
main.c:54:16: error: expected expression before '{' token
   54 |         temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
      |                ^
main.c: In function 'Sorth':
main.c:58:16: error: expected expression before '{' token
   58 |         temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
      |                ^
main.c: In function 'East':
main.c:62:16: error: expected expression before '{' token
   62 |         temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
      |                ^
main.c: In function 'West':
main.c:66:16: error: expected expression before '{' token
   66 |         temp = { t->East, t->Sorth, t->Up, t->Down, t->North, t->West };
      |                ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
DICE assignment( DICE *t);
void input_char(char *t);
DICE North( DICE *t);
DICE Sorth( DICE *t);
DICE East( DICE *t);
DICE West( DICE *t);
DICE temp;
char temp_sentence[100];
int main()
{
	int i;
	char word[100];
	DICE Dice1 =assignment(&temp);
	input_char(word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	return 0;
}
void input_char(char *temp_sentence){
	scanf("%s",temp_sentence);
}
DICE assignment(DICE *t){
	int i,as,a[6];
	for (i = 0; i < 6; i++){
		scanf("%d", &as);
		a[i] = as;
	}
	temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
	return temp;
}
DICE North( DICE *t){
	temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth( DICE *t){
	temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
	return temp;
}
DICE East( DICE *t){
	temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West( DICE *t){
	temp = { t->East, t->Sorth, t->Up, t->Down, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'assignment':
main.c:49:16: error: expected expression before '{' token
   49 |         temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
      |                ^
main.c: In function 'North':
main.c:53:16: error: expected expression before '{' token
   53 |         temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
      |                ^
main.c: In function 'Sorth':
main.c:57:16: error: expected expression before '{' token
   57 |         temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
      |                ^
main.c: In function 'East':
main.c:61:16: error: expected expression before '{' token
   61 |         temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
      |                ^
main.c: In function 'West':
main.c:65:16: error: expected expression before '{' token
   65 |         temp = { t->East, t->Sorth, t->Up, t->Down, t->North, t->West };
      |                ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
DICE assignment( DICE *t);
DICE North( DICE *t);
DICE Sorth( DICE *t);
DICE East( DICE *t);
DICE West( DICE *t);
DICE temp;
char temp_sentence[100];
int main()
{
	int i;
	char word[100];
	DICE Dice1 =assignment(&temp);
	scanf("%s",word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	return 0;
}
DICE assignment(DICE *t){
	int i,as,a[6];
	for (i = 0; i < 6; i++){
		scanf("%d", &as);
		a[i] = as;
	}
	temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
	return temp;
}
DICE North( DICE *t){
	temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth( DICE *t){
	temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
	return temp;
}
DICE East( DICE *t){
	temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West( DICE *t){
	temp = { t->East, t->Sorth, t->Up, t->Down, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'assignment':
main.c:45:16: error: expected expression before '{' token
   45 |         temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
      |                ^
main.c: In function 'North':
main.c:49:16: error: expected expression before '{' token
   49 |         temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
      |                ^
main.c: In function 'Sorth':
main.c:53:16: error: expected expression before '{' token
   53 |         temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
      |                ^
main.c: In function 'East':
main.c:57:16: error: expected expression before '{' token
   57 |         temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
      |                ^
main.c: In function 'West':
main.c:61:16: error: expected expression before '{' token
   61 |         temp = { t->East, t->Sorth, t->Up, t->Down, t->North, t->West };
      |                ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
DICE assignment( DICE *t);
DICE North( DICE *t);
DICE Sorth( DICE *t);
DICE East( DICE *t);
DICE West( DICE *t);
DICE temp;
char temp_sentence[100];
int main()
{
	int i;
	char word[100];
	DICE Dice1 =assignment(&temp);
	scanf("%s",word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	printf("%d\n",Dice1.Up);
	return 0;
}
DICE assignment(DICE *t){
	int i,as,a[6];
	for (i = 0; i < 6; i++){
		scanf("%d", &as);
		a[i] = as;
	}
	temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
	return temp;
}
DICE North( DICE *t){
	temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth( DICE *t){
	temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
	return temp;
}
DICE East( DICE *t){
	temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West( DICE *t){
	temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'assignment':
main.c:46:16: error: expected expression before '{' token
   46 |         temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
      |                ^
main.c: In function 'North':
main.c:50:16: error: expected expression before '{' token
   50 |         temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
      |                ^
main.c: In function 'Sorth':
main.c:54:16: error: expected expression before '{' token
   54 |         temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
      |                ^
main.c: In function 'East':
main.c:58:16: error: expected expression before '{' token
   58 |         temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
      |                ^
main.c: In function 'West':
main.c:62:16: error: expected expression before '{' token
   62 |         temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
      |                ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
DICE assignment( DICE *t);
DICE North( DICE *t);
DICE Sorth( DICE *t);
DICE East( DICE *t);
DICE West( DICE *t);
DICE temp;
char temp_sentence[100];
int main()
{
	unsigned int i;
	char word[100];
	DICE Dice1 =assignment(&temp);
	scanf("%s",word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	printf("%d\n",Dice1.Up);
	return 0;
}
DICE assignment(DICE *t){
	int i,as,a[6];
	for (i = 0; i < 6; i++){
		scanf("%d", &as);
		a[i] = as;
	}
	temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
	return temp;
}
DICE North( DICE *t){
	temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth( DICE *t){
	temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
	return temp;
}
DICE East( DICE *t){
	temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West( DICE *t){
	temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'assignment':
main.c:46:16: error: expected expression before '{' token
   46 |         temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
      |                ^
main.c: In function 'North':
main.c:50:16: error: expected expression before '{' token
   50 |         temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
      |                ^
main.c: In function 'Sorth':
main.c:54:16: error: expected expression before '{' token
   54 |         temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
      |                ^
main.c: In function 'East':
main.c:58:16: error: expected expression before '{' token
   58 |         temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
      |                ^
main.c: In function 'West':
main.c:62:16: error: expected expression before '{' token
   62 |         temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
      |                ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
void assignment( DICE *t);
DICE North( DICE *t);
DICE Sorth( DICE *t);
DICE East( DICE *t);
DICE West( DICE *t);
int main()
{
	unsigned int i;
	char word[100];
	DICE Dice1;
	assignment(&Dice1);
	scanf("%s",word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	printf("%d\n",Dice1.Up);
	return 0;
}
void assignment(DICE *t){
	int i,as,a[6];
	DICE temp;
	for (i = 0; i < 6; i++){
		scanf("%d", &as);
		a[i] = as;
	}
	temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
}
DICE North( DICE *t){
	DICE temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth( DICE *t){
	DICE temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
	return temp;
}
DICE East( DICE *t){
	DICE temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West( DICE *t){
	DICE temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'assignment':
main.c:46:16: error: expected expression before '{' token
   46 |         temp = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
      |                ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
void assignment( DICE *t);
DICE North( DICE *t);
DICE Sorth( DICE *t);
DICE East( DICE *t);
DICE West( DICE *t);
int main()
{
	unsigned int i;
	char word[100];
	DICE Dice1;
	assignment(&Dice1);
	scanf("%s",word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	printf("%d\n",Dice1.Up);
	return 0;
}
void assignment(DICE *t){
	int i,as,a[6];
	for (i = 0; i < 6; i++){
		scanf("%d", &as);
		a[i] = as;
	}
	t = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
}
DICE North( DICE *t){
	DICE temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth( DICE *t){
	DICE temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
	return temp;
}
DICE East( DICE *t){
	DICE temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West( DICE *t){
	DICE temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'assignment':
main.c:45:13: error: expected expression before '{' token
   45 |         t = { t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] };
      |             ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
void assignment( DICE *t);
DICE North( DICE *t);
DICE Sorth( DICE *t);
DICE East( DICE *t);
DICE West( DICE *t);
int main()
{
	unsigned int i;
	char word[100];
	DICE Dice1;
	assignment(&Dice1);
	scanf("%s",word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	printf("%d\n",Dice1.Up);
	return 0;
}
void assignment(DICE *t)
{
	int i,as,a[6];
	for (i = 0; i < 6; i++)
	{
		scanf("%d", &as);
		a[i] = as;
	}
	t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4],t->Down=a[5] ;
}
DICE North( DICE *t){
	DICE temp;
	temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth( DICE *t){
	DICE temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth};
	return temp;
}
DICE East( DICE *t){
	DICE temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West( DICE *t){
	DICE temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'North':
main.c:51:16: error: expected expression before '{' token
   51 |         temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
      |                ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
void assignment(DICE *t);
DICE North(DICE *t);
DICE Sorth(DICE *t);
DICE East(DICE *t);
DICE West(DICE *t);
int main()
{
	unsigned int i;
	char word[100];
	DICE Dice1;
	assignment(&Dice1);
	scanf("%s", word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	printf("%d\n", Dice1.Up);

	return 0;
}
void assignment(DICE *t)
{
	int i, as, a[6];
	for (i = 0; i < 6; i++)
	{
		scanf("%d", &as);
		a[i] = as;
	}
	t->Up = a[0], t->Sorth = a[1], t->East = a[2], t->West = a[3], t->North = a[4], t->Down = a[5];
}
DICE North(DICE *t){
	DICE temp;
	temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth(DICE *t){
	DICE temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth };
	return temp;
}
DICE East(DICE *t){
	DICE temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West(DICE *t){
	DICE temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'North':
main.c:52:16: error: expected expression before '{' token
   52 |         temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
      |                ^
Language: C

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

typedef struct {
	int Up;
	int Sorth;
	int East;
	int West;
	int North;
	int Down;
}DICE;
DICE North(DICE *t);
DICE Sorth(DICE *t);
DICE East(DICE *t);
DICE West(DICE *t);
int main()
{
	unsigned int i;
	int a[6];
	char word[100];
	DICE Dice1;
	for (i = 0; i < 6; i++){
		scanf("%d",&a[i]);
	}
	Dice1 = { a[0], a[1], a[2], a[3], a[4], a[5] };
	scanf("%s", word);
	for (i = 0; i < strlen(word); i++){
		switch (word[i]){
		case 'N':Dice1 = North(&Dice1);
			break;
		case 'S':Dice1 = Sorth(&Dice1);
			break;
		case 'E':Dice1 = East(&Dice1);
			break;
		case 'W':Dice1 = West(&Dice1);
			break;
		}
	}
	printf("%d\n", Dice1.Up);

	return 0;
}
DICE North(DICE *t){
	DICE temp;
	temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
	return temp;
}
DICE Sorth(DICE *t){
	DICE temp = { t->North, t->Up, t->East, t->West, t->Down, t->Sorth };
	return temp;
}
DICE East(DICE *t){
	DICE temp = { t->West, t->Sorth, t->Up, t->Down, t->North, t->East };
	return temp;
}
DICE West(DICE *t){
	DICE temp = { t->East, t->Sorth, t->Down, t->Up, t->North, t->West };
	return temp;
}

Compiler output:
main.c: In function 'main':
main.c:25:17: error: expected expression before '{' token
   25 |         Dice1 = { a[0], a[1], a[2], a[3], a[4], a[5] };
      |                 ^
main.c: In function 'North':
main.c:45:16: error: expected expression before '{' token
   45 |         temp = { t->Sorth, t->Down, t->East, t->West, t->Up, t->North };
      |                ^
Language: C

#include<stdio.h>
int main(void){
int i,s[6],n[6],n2[6];
char c;
for(i=0;i<6;i++){
scanf("%d",&s[i]);
n[i]=i;
}
scanf("%c",&c);
while(1){
scanf("%c",&c);
if(c=='\0'){break;}
if(c=='N'){
n2[0]=n[1];n2[1]=n[5];n2[3]=n[3];n2[4]=n[0];n2[2]=n[2];n2[5]=n[4];
n=n2;
}
if(c=='E'){
n2[0]=n[3];n2[1]=n[1];n2[3]=n[5];n2[4]=n[4];n2[2]=n[0];n2[5]=n[2];
n=n2;
}
if(c=='S'){
n2[0]=n[4];n2[1]=n[0];n2[3]=n[3];n2[4]=n[5];n2[2]=n[2];n2[5]=n[1];
n=n2;
}
if(c=='W'){
n2[0]=n[2];n2[1]=n[1];n2[3]=n[0];n2[4]=n[4];n2[2]=n[5];n2[5]=n[3];
n=n2;
}
}
printf("%d\n",s[n[0]]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:2: error: assignment to expression with array type
   15 | n=n2;
      |  ^
main.c:19:2: error: assignment to expression with array type
   19 | n=n2;
      |  ^
main.c:23:2: error: assignment to expression with array type
   23 | n=n2;
      |  ^
main.c:27:2: error: assignment to expression with array type
   27 | n=n2;
      |  ^
Language: C

#include <stdio.h>

typedef struct dice{
  int up;
  int front;
  int right;
  int left;
  int back;
  int down;
} dice;

int main(void){
  dice sample;
  char c;
  int temp;
 
  scanf("%d%d%d%d%d%d",&sample.up,&sample.front,&sample.right,&sample.left,&sample.back,&sample.down);

  while((c=getchar())!='\n'){
    if(c=='N'){
      temp=sample.front;
      sample.front=smaple.down;
      sample.down=sample.back;
      sample.back=sample.up;
      sample.up=temp;
    } else if(c=='S') {
      temp=sample.back;
      sample.back=sample.down;
      sample.down=sample.front;
      sample.front=sample.up;
      sample.up=temp;
    } else if(c=='E') {
      temp=sample.left;
      sample.left=sample.down;
      sample.down=sample.right;
      sample.right=sample.up;
      sample.up=temp;
    } else if(c=='W') {
      temp=sample.right;
      sample.right=sample.down;
      sample.down=sample.left;
      sample.left=sample.up;
      sample.up=temp;
    }
  }

  printf("%d\n",sample.up);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:20: error: 'smaple' undeclared (first use in this function); did you mean 'sample'?
   22 |       sample.front=smaple.down;
      |                    ^~~~~~
      |                    sample
main.c:22:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

	int a1,a2,a3,a4,a5,a6;
	char cmd = 0;
	int i;
	scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6);
	int x = a1;
	
	for(i = 0 ; 100 > i ; i++){
		scanf("%*c%c",&cmd);
			
		if('N'==cmd){
			 x = a1;
			a1 = a2;
			a2 = a6;
			a6 = a5;
			a5 =  x;
		}
		else if('S'==cmd){
			 x = a1;
			a1 = a5;
			a5 = a6;
			a6 = a2;
			a2 =  x;
		}
		else if('W'==cmd){
			 x = a1;
			a1 = a3;
			a3 = a6;
			a6 = a4;
			a4 =  x;
		}
		else if('E'==cmd){
			 x = a1;
			a1 = a4;
			a4 = a6;
			a6 = a3;
			a3 =  x;
		}
		else {
			break;
		}
	}
	printf("%d\n",a1);
	
	return 0;
}

Compiler output:
main.c:4:15: error: expected declaration specifiers or '...' before string constant
    4 |         scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6);
      |               ^~~~~~~~~~~~~~
main.c:4:30: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6);
      |                              ^
main.c:4:34: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6);
      |                                  ^
main.c:4:38: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6);
      |                                      ^
main.c:4:42: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6);
      |                                          ^
main.c:4:46: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6);
      |                                              ^
main.c:4:50: error: expected declaration specifiers or '...' before '&' token
    4 |         scanf("%d%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5,&a6);
      |                                                  ^
main.c:5:17: error: initializer element is not constant
    5 |         int x = a1;
      |                 ^~
main.c:7:9: error: expected identifier or '(' before 'for'
    7 |         for(i = 0 ; 100 > i ; i++){
      |         ^~~
main.c:7:21: error: expected identifier or '(' before numeric constant
    7 |         for(i = 0 ; 100 > i ; i++){
      |                     ^~~
main.c:7:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    7 |         for(i = 0 ; 100 > i ; i++){
      |                                ^~
main.c:42:16: error: expected declaration specifiers or '...' before string constant
   42 |         printf("%d\n",a1);
      |                ^~~~~~
main.c:42:23: error: expected declaration specifiers or '...' before 'a1'
   42 |         printf("%d\n",a1);
      |                       ^~
main.c:44:9: error: expected identifier or '(' before 'return'
   44 |         return 0;
      |         ^~~~~~
main.c:45:1: error: expected identifier or '(' before '}' token
   45 | }
      | ^
Language: C

#include<iostream>
using namespace std;

class dice{
	public:
	int d[6];
	void roll(char in){//4 2 1 6 5 3
		int direc[4][6]={
			{1,5,2,3,0,4},//n
			{3,1,0,5,4,2},//e
			{4,0,2,3,5,1},//s
			{2,1,5,0,4,3}//w
		};
		int news;
		int temp_d[6];
		if(in =='N')news = 0;
		if(in =='E')news = 1;
		if(in =='S')news = 2;
		if(in =='W')news = 3;
		for(int i = 0;i < 6;i++)
			temp_d[i] = d[direc[news][i]];
		for(int i = 0;i < 6;i++)
			d[i] = temp_d[i];
	}
	void print(void){
		for(int i = 0;i < 6; i++){
			cout << d[i];
			if(i==6-1)cout << endl;
			else cout << " ";
		}
	}
};

int main(){
	dice d1;
	char str[101];
	for(int i = 0;i < 6; i++)
		cin >> d1.d[i];
	cin >> str;
	for(int i = 0; str[i] != '\0'; i++)
		d1.roll(str[i]);
	cout << d1.d[0] << endl;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

struct Dice
{
	int mae;
	int ue;
	int migi;
	int hidari;
	int sita;
	int usiro
};

void ROLL_E(struct Dice dice)
{
	
	int a = dice.ue;
	dice.ue = dice.hidari;
	dice.hidari = dice.sita;
	dice.sita = dice.migi;
	dice.migi = a;
}

void ROLL_N(struct Dice dice)
{
	int a = dice.ue;
	dice.ue = dice.mae;
	dice.mae = dice.sita;
	dice.sita = dice.usiro;
	dice.usiro = a;
}
void ROLL_S(struct Dice dice)
{
	int a = dice.ue;
	dice.ue = dice.usiro;
	dice.usiro = dice.sita;
	dice.sita = dice.mae;
	dice.mae = a;
}
void ROLL_W(struct Dice dice)
{
	int a = dice.ue;
	dice.ue = dice.migi;
	dice.migi = dice.sita;
	dice.sita =dice. hidari;
	dice.hidari = a;		
}

int scan()
{
	struct Dice dice;
	
	scanf("%d"&dice.ue);
	scanf("%d"&dice.mae);
	scanf("%d"&dice.migi);
	scanf("%d"&dice.hidari);
	scanf("%d"&dice.usiro);
	scanf("%d"&dice.sita);
}
int main()
{
	int i,j,a;
	struct Dice dice;
	char move;
	
	scan();
	
	while(1){
		scanf("%c",&move);
		if(move == 'E'){
			ROLL_E(dice);
		}else if(move == 'N'){
			ROLL_N(dice);
		}else if(move == 'S'){
			ROLL_S(dice);
		}else if(move == 'W'){
			ROLL_W(dice);
		}
		
		if(move == '\n'){
			break;
		}
	}
	
	printf("%d\n",ue);
	
	return 0;
}

Compiler output:
main.c:11:1: warning: no semicolon at end of struct or union
   11 | };
      | ^
main.c: In function 'scan':
main.c:52:19: error: invalid operands to binary & (have 'char *' and 'int')
   52 |         scanf("%d"&dice.ue);
      |               ~~~~^~~~~~~~
      |               |        |
      |               char *   int
main.c:53:19: error: invalid operands to binary & (have 'char *' and 'int')
   53 |         scanf("%d"&dice.mae);
      |               ~~~~^~~~~~~~~
      |               |        |
      |               char *   int
main.c:54:19: error: invalid operands to binary & (have 'char *' and 'int')
   54 |         scanf("%d"&dice.migi);
      |               ~~~~^~~~~~~~~~
      |               |        |
      |               char *   int
main.c:55:19: error: invalid operands to binary & (have 'char *' and 'int')
   55 |         scanf("%d"&dice.hidari);
      |               ~~~~^~~~~~~~~~~~
      |               |        |
      |               char *   int
main.c:56:19: error: invalid operands to binary & (have 'char *' and 'int')
   56 |         scanf("%d"&dice.usiro);
      |               ~~~~^~~~~~~~~~~
      |               |        |
      |               char *   int
main.c:57:19: error: invalid operands to binary & (have 'char *' and 'int')
   57 |         scanf("%d"&dice.sita);
      |               ~~~~^~~~~~~~~~
      |               |        |
      |               char *   int
main.c: In function 'main':
main.c:84:23: error: 'ue' undeclared (first use in this function)
   84 |         printf("%d\n",ue);
      |                       ^~
main.c:84:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

struct Dice
{
	int mae;
	int ue;
	int migi;
	int hidari;
	int sita;
	int usiro
};

dice ROLL_E(struct Dice dice)
{
	
	int a = dice.ue;
	dice.ue = dice.hidari;
	dice.hidari = dice.sita;
	dice.sita = dice.migi;
	dice.migi = a;
}

Dice ROLL_N(struct Dice dice)
{
	int a = dice.ue;
	dice.ue = dice.mae;
	dice.mae = dice.sita;
	dice.sita = dice.usiro;
	dice.usiro = a;
}
Dice ROLL_S(struct Dice dice)
{
	int a = dice.ue;
	dice.ue = dice.usiro;
	dice.usiro = dice.sita;
	dice.sita = dice.mae;
	dice.mae = a;
}
Dice ROLL_W(struct Dice dice)
{
	int a = dice.ue;
	dice.ue = dice.migi;
	dice.migi = dice.sita;
	dice.sita =dice. hidari;
	dice.hidari = a;		
}

Dice scan()
{
	struct Dice dice;
	
	scanf("%d",&dice.ue);
	scanf("%d",&dice.mae);
	scanf("%d",&dice.migi);
	scanf("%d",&dice.hidari);
	scanf("%d",&dice.usiro);
	scanf("%d",&dice.sita);
	
	return dice;
}
int main()
{
	int i,j,a;
	struct Dice dice;
	char move;
	
	scan();
	
	while(1){
		scanf("%c",&move);
		if(move == 'E'){
			ROLL_E(dice);
		}else if(move == 'N'){
			ROLL_N(dice);
		}else if(move == 'S'){
			ROLL_S(dice);
		}else if(move == 'W'){
			ROLL_W(dice);
		}
		
		if(move == '\n'){
			break;
		}
	}
	
	printf("%d\n",dice.ue);
	
	return 0;
}

Compiler output:
main.c:11:1: warning: no semicolon at end of struct or union
   11 | };
      | ^
main.c:13:1: error: unknown type name 'dice'
   13 | dice ROLL_E(struct Dice dice)
      | ^~~~
main.c:23:1: error: unknown type name 'Dice'; use 'struct' keyword to refer to the type
   23 | Dice ROLL_N(struct Dice dice)
      | ^~~~
      | struct 
main.c:31:1: error: unknown type name 'Dice'; use 'struct' keyword to refer to the type
   31 | Dice ROLL_S(struct Dice dice)
      | ^~~~
      | struct 
main.c:39:1: error: unknown type name 'Dice'; use 'struct' keyword to refer to the type
   39 | Dice ROLL_W(struct Dice dice)
      | ^~~~
      | struct 
main.c:48:1: error: unknown type name 'Dice'; use 'struct' keyword to refer to the type
   48 | Dice scan()
      | ^~~~
      | struct 
main.c: In function 'scan':
main.c:59:16: error: incompatible types when returning type 'struct Dice' but 'int' was expected
   59 |         return dice;
      |                ^~~~
Language: C

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

typedef struct{
    int N;
    int E;
    int W;
    int S;
    int T;
    int B;
}TCycoro;
enum {pos1, pos2, pos3, pos4, pos5, pos6, posEND};
char Cmd[101];
void CyRot(TCycoro *cyc, char dir)
{
    int S;

    switch(dir){
        'N': // do not move EW
             S=cyc->N, cyc->N = cyc->T, cyc->T=cyc->S, cyc->S=cyc->B, cyc->B=S; break;
        'E': // do not move NS
             S=cyc->E, cyc->E = cyc->T, cyc->T=cyc->W, cyc->W=cyc->B, cyc->E=S; break;
        'W': // do not move NS
             S=cyc->W, cyc->W = cyc->T, cyc->T=cyc->E, cyc->E=cyc->B, cyc->W=S; break;
        'S': // do not move EW
             S=cyc->S, cyc->S = cyc->T, cyc->T=cyc->N, cyc->N=cyc->B, cyc->S=S; break;
    }
}

int main()
{
    int i,cyval[posEND]; TCycoro Cyc; 

    Cyc.N=pos5;
    Cyc.E=pos3;
    Cyc.W=pos2;
    Cyc.S=pos4;
    Cyc.T=pos1;
    Cyc.B=pos6;
    for (i=0; posEND; i++)
        scanf("%d", &cyval[i]);
    gets(Cmd);
    for (i=0; Cmd[i]; i++){
        CyRot(&Cyc, Cmd[i]);
    }
    printf("%d\n", cyval[Cyc.T]);
    return 0;
}

Compiler output:
main.c: In function 'CyRot':
main.c:20:12: error: expected ';' before ':' token
   20 |         'N': // do not move EW
      |            ^
      |            ;
main.c:22:12: error: expected ';' before ':' token
   22 |         'E': // do not move NS
      |            ^
      |            ;
main.c:24:12: error: expected ';' before ':' token
   24 |         'W': // do not move NS
      |            ^
      |            ;
main.c:26:12: error: expected ';' before ':' token
   26 |         'S': // do not move EW
      |            ^
      |            ;
main.c: In function 'main':
main.c:43:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   43 |     gets(Cmd);
      |     ^~~~
      |     fgets
Language: C

#include <stdio.h>
#include <string.h>
char B[200];
int A[10];
void Search(int num);
int main(void){
	int i,n,len;
	char str[100],*line;

	fgets(str,sizeof(str),stdin);
	line = strtok(str," ");
	sscanf(line,"%d",&n); A[1]=n;
	for(i=2;i<=6;i++){
		line = strtok(NULL," ");
		sscanf(line,"%d",&n); A[i]=n;
	}
	fgets(B,sizeof(str),stdin);#include <stdio.h>
#include <string.h>
char B[101];
int A[10];
void Search(int num);
int main(void){
	int i,n,len;
	char str[100],*line;

	fgets(str,sizeof(str),stdin);
	line = strtok(str," ");
	sscanf(line,"%d",&n); A[1]=n;
	for(i=2;i<=6;i++){
		line = strtok(NULL," ");
		sscanf(line,"%d",&n); A[i]=n;
	}
	scanf("%s",B);
	for(i=0;B[i] !='\0';i++){
		switch(B[i]){
			case 'N': Search(2); break;
			case 'W': Search(3); break;
			case 'E': Search(4); break;
			case 'S': Search(5); break;
		}
	}
	printf("%d\n",A[1]);
	return 0;
}
			
void Search(int num){
	int tmp;
	tmp = A[1];
	A[1] = A[num];
	A[num] = A[6];
	A[6] = A[7-num];
	A[7-num] = tmp;
}

	len = strlen(B)-1;
	for(i=0;B[i] !='\0';i++){
		switch(B[i]){
			case 'N': Search(2); break;
			case 'W': Search(3); break;
			case 'E': Search(4); break;
			case 'S': Search(5); break;
		}
	}
	printf("%d\n",A[1]);
	return 0;
}
			
void Search(int num){
	int tmp;
	tmp = A[1];
	A[1] = A[num];
	A[num] = A[6];
	A[6] = A[7-num];
	A[7-num] = tmp;
}

Compiler output:
main.c: In function 'main':
main.c:17:36: error: stray '#' in program
   17 |         fgets(B,sizeof(str),stdin);#include <stdio.h>
      |                                    ^
main.c:17:37: error: 'include' undeclared (first use in this function)
   17 |         fgets(B,sizeof(str),stdin);#include <stdio.h>
      |                                     ^~~~~~~
main.c:17:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:46: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
   17 |         fgets(B,sizeof(str),stdin);#include <stdio.h>
      |                                              ^~~~~
      |                                              stdin
main.c:19:1: error: expected expression before 'char'
   19 | char B[101];
      | ^~~~
main.c:46:6: error: static declaration of 'Search' follows non-static declaration
   46 | void Search(int num){
      |      ^~~~~~
main.c:21:6: note: previous declaration of 'Search' with type 'void(int)'
   21 | void Search(int num);
      |      ^~~~~~
Language: C

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

void mov(struct dice *d, char c[], int len);

typedef struct dice {

	int num[6];

}dice;

int main(void) {

	dice dice1;
	int i = 0;
	char c[101];
	int len;

	for(i = 0; i < 6; i++)
		dice1.num[i] = { 0 };

	for (i = 0; i < 6; i++)
		scanf("%d", &dice1.num[i]);

	scanf("%s", c);

	len = strlen(c);

	mov(&dice1, c, len);

	printf("%d\n", dice1.num[0]);

	return 0;
}

void mov(struct dice *d, char c[], int len) {
	int tmp = 0;
	int i = 0;

	for (i = 0; i < len; i++) {
		if ('E' == c[i]) {
			tmp = (*d).num[0];
			(*d).num[0] = (*d).num[3];
			(*d).num[3] = (*d).num[5];
			(*d).num[5] = (*d).num[2];
			(*d).num[2] = tmp;
		}
		else if ('N' == c[i]) {
			tmp = (*d).num[0];
			(*d).num[0] = (*d).num[1];
			(*d).num[1] = (*d).num[5];
			(*d).num[5] = (*d).num[4];
			(*d).num[4] = tmp;
		}
		else if ('S' == c[i]) {
			tmp = (*d).num[0];
			(*d).num[0] = (*d).num[4];
			(*d).num[4] = (*d).num[5];
			(*d).num[5] = (*d).num[1];
			(*d).num[1] = tmp;
		}
		else if ('W' == c[i]) {
			tmp = (*d).num[0];
			(*d).num[0] = (*d).num[2];
			(*d).num[2] = (*d).num[5];
			(*d).num[5] = (*d).num[3];
			(*d).num[3] = tmp;
		}
	}
}

Compiler output:
main.c:4:17: warning: 'struct dice' declared inside parameter list will not be visible outside of this definition or declaration
    4 | void mov(struct dice *d, char c[], int len);
      |                 ^~~~
main.c: In function 'main':
main.c:20:32: error: expected expression before '{' token
   20 |                 dice1.num[i] = { 0 };
      |                                ^
main.c:29:13: error: passing argument 1 of 'mov' from incompatible pointer type [-Wincompatible-pointer-types]
   29 |         mov(&dice1, c, len);
      |             ^~~~~~
      |             |
      |             dice *
main.c:4:23: note: expected 'struct dice *' but argument is of type 'dice *'
    4 | void mov(struct dice *d, char c[], int len);
      |          ~~~~~~~~~~~~~^
main.c: At top level:
main.c:36:6: error: conflicting types for 'mov'; have 'void(struct dice *, char *, int)'
   36 | void mov(struct dice *d, char c[], int len) {
      |      ^~~
main.c:4:6: note: previous declaration of 'mov' with type 'void(struct dice *, char *, int)'
    4 | void mov(struct dice *d, char c[], int len);
      |      ^~~
Language: C

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

void mov(struct dice *d, char c[], int len);

typedef struct dice {

	int num[6];

}dice;

int main(void) {

	dice dice1;
	int i = 0;
	char c[101];
	int len;

	for(i = 0; i < 6; i++)
		dice1.num[i] = {};

	for (i = 0; i < 6; i++)
		scanf("%d", &dice1.num[i]);

	scanf("%s", c);

	len = strlen(c);

	mov(&dice1, c, len);

	printf("%d\n", dice1.num[0]);

	return 0;
}

void mov(struct dice *d, char c[], int len) {
	int tmp = 0;
	int i = 0;

	for (i = 0; i < len; i++) {
		if ('E' == c[i]) {
			tmp = (*d).num[0];
			(*d).num[0] = (*d).num[3];
			(*d).num[3] = (*d).num[5];
			(*d).num[5] = (*d).num[2];
			(*d).num[2] = tmp;
		}
		else if ('N' == c[i]) {
			tmp = (*d).num[0];
			(*d).num[0] = (*d).num[1];
			(*d).num[1] = (*d).num[5];
			(*d).num[5] = (*d).num[4];
			(*d).num[4] = tmp;
		}
		else if ('S' == c[i]) {
			tmp = (*d).num[0];
			(*d).num[0] = (*d).num[4];
			(*d).num[4] = (*d).num[5];
			(*d).num[5] = (*d).num[1];
			(*d).num[1] = tmp;
		}
		else if ('W' == c[i]) {
			tmp = (*d).num[0];
			(*d).num[0] = (*d).num[2];
			(*d).num[2] = (*d).num[5];
			(*d).num[5] = (*d).num[3];
			(*d).num[3] = tmp;
		}
	}
}

Compiler output:
main.c:4:17: warning: 'struct dice' declared inside parameter list will not be visible outside of this definition or declaration
    4 | void mov(struct dice *d, char c[], int len);
      |                 ^~~~
main.c: In function 'main':
main.c:20:32: error: expected expression before '{' token
   20 |                 dice1.num[i] = {};
      |                                ^
main.c:29:13: error: passing argument 1 of 'mov' from incompatible pointer type [-Wincompatible-pointer-types]
   29 |         mov(&dice1, c, len);
      |             ^~~~~~
      |             |
      |             dice *
main.c:4:23: note: expected 'struct dice *' but argument is of type 'dice *'
    4 | void mov(struct dice *d, char c[], int len);
      |          ~~~~~~~~~~~~~^
main.c: At top level:
main.c:36:6: error: conflicting types for 'mov'; have 'void(struct dice *, char *, int)'
   36 | void mov(struct dice *d, char c[], int len) {
      |      ^~~
main.c:4:6: note: previous declaration of 'mov' with type 'void(struct dice *, char *, int)'
    4 | void mov(struct dice *d, char c[], int len);
      |      ^~~