From b31e0ca9e40641463f1347a6062e96997e275581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E8=83=9C=E6=9D=83?= <2731084872@qq.com> Date: Tue, 29 Nov 2022 19:30:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=83=9C=E6=9D=83=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...60\347\254\246\350\277\220\347\256\227.md" | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 "45 \347\224\260\350\203\234\346\235\203/20221129java\346\225\260\347\254\246\350\277\220\347\256\227.md" diff --git "a/45 \347\224\260\350\203\234\346\235\203/20221129java\346\225\260\347\254\246\350\277\220\347\256\227.md" "b/45 \347\224\260\350\203\234\346\235\203/20221129java\346\225\260\347\254\246\350\277\220\347\256\227.md" new file mode 100644 index 0000000..eacb1a6 --- /dev/null +++ "b/45 \347\224\260\350\203\234\346\235\203/20221129java\346\225\260\347\254\246\350\277\220\347\256\227.md" @@ -0,0 +1,55 @@ +```java +import java.util.Scanner; + +public class dd { + public dd() { + } + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + System.out.println("请输入您的姓名:"); + String name = sc.next(); + System.out.println("年龄:"); + String next = sc.next(); + System.out.println("性别:"); + String my = sc.next(); + System.out.println("所在学校:"); + String is = sc.next(); + System.out.println("所学专业"); + String qq = sc.next(); + System.out.println("我的偶像:"); + String qiu = sc.next(); + } +} +``` + +```java +import java.util.Scanner; + +public class d1 { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int num = sc.nextInt(); + int g = (num%10); + int s = (num/10%10); + int b = (num/100%10); + int q = (num/1000); + System.out.println("输入的数字"+num+"\n个位:"+g+",十位:"+s+",百位:"+b+",千位:"+q); + } +} +``` + +```java +package shangJiPractice; + import java.util.Scanner; + public class aa { + public static void main(String[] args){ + Scnner sc=new Scanner(System.in); + System.out.println("请输入一个华氏度:"); + double fah =sc.nextDouble(); + System.out.println(); + System.out.println("转换结果"+fah+"华氏度(℉)≈"+((fah - 32)*5)/9+"摄氏度(℃)"); + sc=close(); +}} +``` + -- Gitee From 7714f54caa03594ee1a986743cfc13113d847cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E8=83=9C=E6=9D=83?= <2731084872@qq.com> Date: Thu, 1 Dec 2022 21:51:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=83=9C=E6=9D=83=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=AC=A1=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2022121java.txt" | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 "45 \347\224\260\350\203\234\346\235\203/2022121java.txt" diff --git "a/45 \347\224\260\350\203\234\346\235\203/2022121java.txt" "b/45 \347\224\260\350\203\234\346\235\203/2022121java.txt" new file mode 100644 index 0000000..e3c095a --- /dev/null +++ "b/45 \347\224\260\350\203\234\346\235\203/2022121java.txt" @@ -0,0 +1,38 @@ +# 作业 + +``` java +import java.util.Scanner; + +public class out { + public static void main(String[] args) { + Scanner sc = new Scanner( System.in); + System.out.println("请输入中国的分数"); + int zg = sc.nextInt(); + System.out.println("请输入日本的分数"); + int rb = sc.nextInt(); + if (zg+rb>6 | zg+rb<0){ + System.out.println("该分数错误"); + } + else if (zg-rb==0) { + System.out.println("中方与小日子方平局"); + } + else if (zg-rb==1){ + System.out.println("小日子输一分,奖励中方一比零长汀豆腐干"); + } + else if (zg-rb==2){ + System.out.println("中方二比零。奖励中方长汀河田鸡一只"); + } + else if (zg-rb==3) { + System.out.println("中方3:0横扫小日子成为新一代抗日英雄"); + } else if (zg-rb<0){ + System.out.println("那中方选手名为汉臣,实为汉贼,中方观众就会汉贼不两立"); + } + else { + System.out.println("汉贼不两立"); + } + } + } + + +``` + -- Gitee