2021-07-02

新手制作,编辑不易。求点赞关注。

import java.util.Random;
import java.util.Scanner;

public class shitou {
    public static void main(String[] args) {
        int j = 0;int b = 0;int a =0;
        for (int i = 3; i <100000; i++) {
            System.out.println(" ____________________________");
            System.out.println("|请出拳,1是石头,2是剪刀,3是布|");
            System.out.println("  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄");
            Scanner sc =new Scanner(System.in);
            int quan =sc.nextInt();
                          System.out.println("__________");
            if (quan%3==1)System.out.println("|你  :石头|");
            if (quan%3==2)System.out.println("|你  :剪刀|");
            if (quan%3==0)System.out.println("|你  :布  |");

            int r = (int) (Math.random()*100);
            if (r<33) System.out.println("|电脑:石头|");
            if (r>=33&r<66) System.out.println("|电脑:剪刀|");
            if (r>=66) System.out.println("|电脑:布  |");
            System.out.println("~~~~~~~~~~~~~~~");

            if (quan%3==1&r<33      )System.out.println("︴平,再来      ︴");
            if (quan%3==1&r<33      )j++;
            if (quan%3==1&r>=33&r<66)System.out.println("︴你赢了(*^_^*) ︴");
            if (quan%3==1&r>=33&r<66)b++;
            if (quan%3==1&r>=66     )System.out.println("︴你输了(ㄒoㄒ) ︴");
            if (quan%3==1&r>=66     )a++;

            if (quan%3==2&r<33      ) System.out.println("︴你输了(ㄒoㄒ) ︴");
            if (quan%3==2&r<33      )a++;
            if (quan%3==2&r>=33&r<66) System.out.println("︴平,再来      ︴");
            if (quan%3==2&r>=33&r<66)j++;
            if (quan%3==2&r>=66     ) System.out.println("︴你赢了(*^_^*) ︴");
            if (quan%3==2&r>=66     )b++;

            if (quan%3==0&r<33      ) System.out.println("︴你赢了(*^_^*) ︴");
            if (quan%3==0&r<33      )b++;
            if (quan%3==0&r>=33&r<66) System.out.println("︴你输了(ㄒoㄒ) ︴");
            if (quan%3==0&r>=33&r<66)a++;
            if (quan%3==0&r>=66     ) System.out.println("︴平,再来      ︴");
            if (quan%3==0&r>=66     )j++;
            System.out.println("~~~~~~~~~~~~~~~");
            System.out.println(" ______________________________");
            System.out.println("|《你赢了"+ b +"次》                  |");
            System.out.println("|《你输了"+ a +"次》                  |");
            System.out.println("|《你平了"+ j +"次》                  |");
            System.out.println("  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄");
            System.out.println();


        }

    }
}

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值