您的位置:首页 > 其它

小鑫の日常系列故事(二)——石头剪子布

2016-11-07 00:43 423 查看


小鑫の日常系列故事(二)——石头剪子布

Time Limit: 1000MS Memory Limit: 65536KB

Submit Statistic


Problem Description

小鑫在上幼儿园的时候,喜欢跟小伙伴健健玩石头剪子布的游戏 ,你能帮他们判断谁胜谁负么?




Input

 输入有两行,每一行都有可能为“Rock”(石头),“Scissors”(剪子),”Cloth”(布)。第一行为小鑫的选择,第二行为健健的选择。


Output

 输出有一行,如果小鑫赢了输出“Win”,输了输出“Lose”,平局输出“Equal”。(输出不包括引号)


Example Input

Rock
Scissors



Example Output

Win


#include<stdio.h>
#include<stdio.h>
int main()
{
char a[100], b[100], c[100];
gets(a);
gets(b);
if (strcmp(a, "Rock") == 0 && strcmp(b, "Rock") == 0)
printf("Equal\n");
if (strcmp(a, "Rock") == 0 && strcmp(b, "Scissors") == 0)
printf("Win\n");
if (strcmp(a, "Rock") == 0 && strcmp(b, "Cloth") == 0)
printf("Lose\n");
if (strcmp(a, "Scissors") == 0 && strcmp(b, "Scissors") == 0)
printf("Equal\n");
if (strcmp(a, "Scissors") == 0 && strcmp(b, "Rock") == 0)
printf("Lose\n");
if (strcmp(a, "Scissors") == 0 && strcmp(b, "Cloth") == 0)
printf("Win\n");
if (strcmp(a, "Cloth") == 0 && strcmp(b, "Cloth") == 0)
printf("Equal\n");
if (strcmp(a, "Cloth") == 0 && strcmp(b, "Rock") == 0)
printf("Win\n");
if (strcmp(a, "Cloth") == 0 && strcmp(b, "Scissors") == 0)
printf("Lose\n");

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: