Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- char d[7], l[7], p[7];
- while (scanf("%s %s %s", d, l, p))
- {
- int winner=0;
- // Winner Dodo
- if (l[2]==p[2] && p[2]!=d[2])
- {
- if ((d[2]=='p' && l[2]=='d') || (d[2]=='d' && l[2]=='s') || (d[2]=='s' && l[2]=='p'))
- {
- winner=1;
- }
- }
- // Winner Leo
- if (d[2]==p[2] && p[2]!=l[2])
- {
- if ((l[2]=='p' && d[2]=='d') || (l[2]=='d' && d[2]=='s') || (l[2]=='s' && d[2]=='p'))
- {
- winner=2;
- }
- }
- // Winner Pepper
- if (d[2]==l[2] && l[2]!=p[2])
- {
- if ((p[2]=='p' && l[2]=='d') || (p[2]=='d' && l[2]=='s') || (p[2]=='s' && l[2]=='p'))
- {
- winner=3;
- }
- }
- switch (winner)
- {
- default:
- printf("Putz vei, o Leo ta demorando muito pra jogar…\n");
- break;
- case 1:
- printf("Os atributos dos monstros vao ser inteligencia, sabedoria…\n");
- break;
- case 2:
- printf("Iron Maiden’s gonna get you, no matter how far!\n");
- break;
- case 3:
- printf("Urano perdeu algo muito precioso…\n");
- break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement