Sie sind auf Seite 1von 1

#include <stdio.

h>
void execute(int n,int *x,int *y,int *z){
if(n==1){
*z=*z+1;
}
if(n==2){
*z=*z-1;
}
if(n==3){
*x=*x+1;
}
if(n==4){
*x=*x-1;
}
if(n==5){
*y=*y+1;
}
if(n==6){
*y=*y-1;
}
}

int main(void) {
int x,y,z,c,q;
scanf("%d%d%d%d%d\n",&x,&y,&z,&c,&q);
int com[c];
for(int i=0;i<c;i++){
scanf("%d",&com[i]);
}
int que[q];
for(int i=0;i<q;i++){
scanf("%d",&que[i]);
}
execute(c[0],&x,&y,&z);
int t1[3];

execute(c[1],&x,&y,&z);
execute(c[2],&x,&y,&z);
execute(c[3],&x,&y,&z);
execute(c[4],&x,&y,&z);
execute(c[5],&x,&y,&z);

return 0;
}

Das könnte Ihnen auch gefallen