can anybody tell me what’s wrong with this code…??
Your code:
scanf("%d%d",&p1[x],&p2[x]);
if(p1 > p2)
win[x] = true;
else
win[x] = false;
s1 += p1[x];
s2 += p2[x];
Modified one:
scanf("%d%d",&p1[x],&p2[x]);
if(p1[x] > p2[x]) <<<<- Here is the problem with your code
win[x] = true;
else
win[x] = false;
s1 += p1[x];
s2 += p2[x];
1 Like