TOPIC

pq está dando erro?

Mayume Cristine asked 5 months ago

include

int main() { int i, N, M=0, J=0;

while(1){
scanf("%d", &N);

if(N==0){
    printf("\n");
    break;}

int R[N];

for(i=0; i<N; i++)
{
    scanf("%d", &R[i]);
    if(R[i]==0) //maria venceu
        M++;
    else if(R[i]==1)//Joao venceu
        J++;
}
printf("\nMary won %d times and John won %d times\n", M, J);
M=0;
J=0;
};

return 0;

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.