int sc1,sc2,a=0,b=0; do { printf("Give the scores\n"); scanf("%d %d", &sc1,&sc2); //=============================================== if (sc1 > sc2) a+=1; else if (sc1<sc2) b+=1; else if (sc1==sc2) printf("tie\n"); //=============================================== if (a>b) printf("team 1 is in the lead\n"); else if (a<b) printf("team 2 is in the lead\n"); else if (b==a) printf("tie\n"); } while((a==3) || (b==3)); //=============================================== if (a==3) printf("team 1 got the cup"); else printf("team 2 got the cup"); I think that I wrote something wrong. I've searched it a lot but can't seem to find what is wrong with it.
(One of the two teams can win the cup and that team has to have 3 wins)
*else if(sc1
*else if(a>b)