-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path1828.c
51 lines (46 loc) · 1.71 KB
/
1828.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
/*
* -----------------------------------
* | Pedro Daniel Jardim |
* | UFV |
* | 29/02/2020 |
* ----------------------------------
*
*/
int main ()
{
unsigned short int n, cont = 0;
char sheldon[10], raj[10];
scanf("%hd", &n);
for (unsigned short i = 0; i < n; i++)
{
cont++;
scanf("%s %s", sheldon, raj);
if (strcmp(sheldon, raj) == 0)
printf("Caso #%d: De novo!\n", cont);
else if (strcmp(sheldon, "Spock") == 0 && strcmp(raj, "pedra") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "lagarto") == 0 && strcmp(raj, "Spock") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "tesoura") == 0 && strcmp(raj, "lagarto") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "papel") == 00 && strcmp(raj, "Spock") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "tesoura") == 0 && strcmp(raj, "papel") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "papel") == 0 && strcmp(raj, "pedra") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "lagarto") == 0 && strcmp(raj, "papel") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "pedra") == 0 && strcmp(raj, "lagarto") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "Spock") == 0 && strcmp(raj, "tesoura") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else if (strcmp(sheldon, "pedra") == 0 && strcmp(raj, "tesoura") == 0)
printf("Caso #%d: Bazinga!\n", cont);
else
printf("Caso #%d: Raj trapaceou!\n", cont);
}
}