python版: import randomprint("-----猜拳游戏-----")print("---0.剪刀--1.石头--2.布---")while True: ins = int(input("请输入数字:\n")) b = random.randint(0,3) if ins>2 or ins<0:#检测输入的数值错误 print("输入错误,请输入0-2数字..") else: if ins==b…
import random # 调用随机数模块 pc = random.randint(1,3) # 产生1-3的随机数 print("来玩个猜拳游戏吧!") a = '石头' b = '剪刀' c = '布' user = input('请输入(石头,剪刀,布):') if user == '石头': print("你出了石头") elif user == '剪刀': print("你出了剪刀") else: print("你出了布&…
方法一: Console.WriteLine("请输入三个数字:"); int a = int.Parse(Console.ReadLine()); int b = int.Parse(Console.ReadLine()); int c = int.Parse(Console.ReadLine()); int max; if (a > b) { max = a; } else { max = b; } if (c > max) { Console.WriteLine(c)…