Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void) {
- int jog1,jog2,jog3;
- printf("jogadores insiram em ordem o numero 1 ou 2 desejado\n");
- scanf("%d %d %d",&jog1,&jog2,&jog3);
- while(jog1==jog2&&jog2==jog3){
- printf("tente novamente\n");
- scanf("%d %d %d", &jog1,&jog2,&jog3);
- }
- if(jog1==jog2&&jog1!=jog3){
- printf("jogador 3 ganhou\n");
- }
- else if(jog1==jog3&&jog2!=jog3){
- printf("jogador 2 ganhou\n");
- }
- else if(jog2==jog3&&jog1!=jog2){
- printf("jogador 1 ganhou");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement