diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.classpath" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.classpath" new file mode 100644 index 0000000000000000000000000000000000000000..51a8bbad89682d379e0aadb7bd54d22de601a62f --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.classpath" @@ -0,0 +1,6 @@ + + + + + + diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.project" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.project" new file mode 100644 index 0000000000000000000000000000000000000000..91521860945d3f8f00c650504cc688b9036b4c3f --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.project" @@ -0,0 +1,17 @@ + + + HelloWorld + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.settings/org.eclipse.jdt.core.prefs" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.settings/org.eclipse.jdt.core.prefs" new file mode 100644 index 0000000000000000000000000000000000000000..3a21537071bf4118b9e1ee864cb4bc258aa48211 --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/.settings/org.eclipse.jdt.core.prefs" @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/bin/com/md/lesson1/HelloWorld.class" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/bin/com/md/lesson1/HelloWorld.class" new file mode 100644 index 0000000000000000000000000000000000000000..d770c7c6a0d10a7447f8dc37bfdfbfbc706de17d Binary files /dev/null and "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/bin/com/md/lesson1/HelloWorld.class" differ diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/src/com/md/lesson1/HelloWorld.java" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/src/com/md/lesson1/HelloWorld.java" new file mode 100644 index 0000000000000000000000000000000000000000..b4605794559e96188322b9d4a213422923a336c4 --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/HelloWorld/src/com/md/lesson1/HelloWorld.java" @@ -0,0 +1,10 @@ +package com.md.lesson1; + +public class HelloWorld { + + public static void main(String[] args) { + System.out.println("HelloWorld !!!"); + + } + +} diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.classpath" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.classpath" new file mode 100644 index 0000000000000000000000000000000000000000..51a8bbad89682d379e0aadb7bd54d22de601a62f --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.classpath" @@ -0,0 +1,6 @@ + + + + + + diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.project" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.project" new file mode 100644 index 0000000000000000000000000000000000000000..9e8fab9dcbe943932195e791fc7bb83bf56dc278 --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.project" @@ -0,0 +1,17 @@ + + + yinshen + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.settings/org.eclipse.jdt.core.prefs" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.settings/org.eclipse.jdt.core.prefs" new file mode 100644 index 0000000000000000000000000000000000000000..3a21537071bf4118b9e1ee864cb4bc258aa48211 --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/.settings/org.eclipse.jdt.core.prefs" @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/bin/com/md/lesson01/calculator.class" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/bin/com/md/lesson01/calculator.class" new file mode 100644 index 0000000000000000000000000000000000000000..0509df22e5d4c5358701d7308902e47d846fbbfc Binary files /dev/null and "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/bin/com/md/lesson01/calculator.class" differ diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/src/com/md/lesson01/Calculator.java" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/src/com/md/lesson01/Calculator.java" new file mode 100644 index 0000000000000000000000000000000000000000..34b8e1a5063d3299bf8a102a8cfd11bbb0820cab --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\346\270\270\346\210\217/src/com/md/lesson01/Calculator.java" @@ -0,0 +1,54 @@ +package com.md.lesson01; + +import java.util.Scanner; + +public class calculator { + /* + 编写程序,定义变量,分别存放游戏中某个英雄的属性信息, + 包括:人物角色名(roleName)、生命值(health)、攻击力(damage) + 、防御力(defense)、武器加成(weaponScaling)、是否是热门英雄(isHot)。 + */ + public static void main(String[] args) { + String roleName; + long health; + int damage; + int defense; + float weaponScaling; + boolean isHot; + + Scanner scanner = new Scanner(System.in); + + System.out.println("请输入您的英雄名字:"); + roleName=scanner.next(); + + System.out.println("请输入英雄的生命值:"); + health=scanner.nextLong(); + + System.out.println("请输入英雄的攻击力:"); + damage=scanner.nextInt(); + + System.out.println("请输入英雄的防御力:"); + defense=scanner.nextInt(); + + System.out.println("请输入英雄的武器加成:"); + weaponScaling=scanner.nextFloat(); + + System.out.println("请输入英雄是否是热门英雄:"); + isHot=scanner.nextBoolean(); + + + + + + System.out.println("人物的角色名是:"+roleName); + System.out.println("人物的生命值是:"+health); + System.out.println("人物的攻击力是:"+damage); + System.out.println("人物的防御力是:"+defense); + System.out.println("人物的武器加成是:"+weaponScaling); + System.out.println("人物是否是热门英雄:"+isHot); + + + + + } +} diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.classpath" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.classpath" new file mode 100644 index 0000000000000000000000000000000000000000..51a8bbad89682d379e0aadb7bd54d22de601a62f --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.classpath" @@ -0,0 +1,6 @@ + + + + + + diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.project" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.project" new file mode 100644 index 0000000000000000000000000000000000000000..7aa5cfe2b47fb0755d75fcca834e6f8bd19fc913 --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.project" @@ -0,0 +1,17 @@ + + + ych + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.settings/org.eclipse.jdt.core.prefs" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.settings/org.eclipse.jdt.core.prefs" new file mode 100644 index 0000000000000000000000000000000000000000..3a21537071bf4118b9e1ee864cb4bc258aa48211 --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/.settings/org.eclipse.jdt.core.prefs" @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/bin/ych/zwjs.class" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/bin/ych/zwjs.class" new file mode 100644 index 0000000000000000000000000000000000000000..7da8ef6ddce324d63144260d9391dd20be72dda2 Binary files /dev/null and "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/bin/ych/zwjs.class" differ diff --git "a/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/src/ych/Zwjs.java" "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/src/ych/Zwjs.java" new file mode 100644 index 0000000000000000000000000000000000000000..1f09de8f22ea7cacfad54ff559bcfc47ca8c29cf --- /dev/null +++ "b/Java\347\254\254\344\270\200\344\272\214\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\207\252\346\210\221\344\273\213\347\273\215/src/ych/Zwjs.java" @@ -0,0 +1,48 @@ +package ych; + +import java.util.Scanner; + +public class zwjs { + + public static void main(String[] args) { + String name; + int age; + String gender; + int number; + int html; + String food; + + Scanner scanner = new Scanner(System.in); + + System.out.println("请输入您的名字:"); + name = scanner.next(); + + System.out.println("请输入您的年龄:"); + age = scanner.nextInt(); + + System.out.println("请输入您的性别:"); + gender = scanner.next(); + + System.out.println("请输入您的学号:"); + number = scanner.nextInt(); + + System.out.println("请输入您的HTML成绩:"); + html = scanner.nextInt(); + + System.out.println("请输入您最喜欢的食物:"); + food = scanner.next(); + + + + + + System.out.println("人物的名字是:"+name); + System.out.println("人物的年龄是:"+age); + System.out.println("人物的性别是:"+gender); + System.out.println("人物的学号是:"+number); + System.out.println("人物的HTML成绩是:"+html); + System.out.println("人物最喜欢的食物是:"+food); + + } + +} diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.classpath" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.classpath" new file mode 100644 index 0000000000000000000000000000000000000000..51a8bbad89682d379e0aadb7bd54d22de601a62f --- /dev/null +++ "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.classpath" @@ -0,0 +1,6 @@ + + + + + + diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.project" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.project" new file mode 100644 index 0000000000000000000000000000000000000000..bbea8cd661138d3757211a98ff77cdd963ae35a3 --- /dev/null +++ "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.project" @@ -0,0 +1,17 @@ + + + YCH + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.settings/org.eclipse.jdt.core.prefs" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.settings/org.eclipse.jdt.core.prefs" new file mode 100644 index 0000000000000000000000000000000000000000..3a21537071bf4118b9e1ee864cb4bc258aa48211 --- /dev/null +++ "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/.settings/org.eclipse.jdt.core.prefs" @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/Demo2.class" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/Demo2.class" new file mode 100644 index 0000000000000000000000000000000000000000..cc42c44ea6b72ed1b017f4a09e65020aef617955 Binary files /dev/null and "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/Demo2.class" differ diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/FZ.class" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/FZ.class" new file mode 100644 index 0000000000000000000000000000000000000000..1e33f79a69bc918fd48d234d85ee1c839cc1467d Binary files /dev/null and "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/FZ.class" differ diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/ZH.class" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/ZH.class" new file mode 100644 index 0000000000000000000000000000000000000000..368163e24dfef9178ea01b64dd959480380eaed9 Binary files /dev/null and "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/bin/ZH.class" differ diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/Demo2.java" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/Demo2.java" new file mode 100644 index 0000000000000000000000000000000000000000..5ad33c2829dac61efd71dac15d4ab71af8c02922 --- /dev/null +++ "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/Demo2.java" @@ -0,0 +1,30 @@ +import java.util.Scanner; + +public class Demo2 { + + public static void main(String[] args) { + int num1; + int num2; + int temp; + + Scanner scan= new Scanner(System.in); + System.out.print("请输入第一个数字!"); + num1=scan.nextInt(); + + + System.out.print("请输入第二个数字!"); + num2=scan.nextInt(); + + System.out.print("你输入的两位数分别是:"); + System.out.print("num1="+num1+" " ); + System.out.print("num2="+num2+" "); + + temp=num1; + num1=num2; + num2=temp; + + System.out.print("两位互换后分别是:"); + System.out.print(+num1+" "); + System.out.print(+num2 ); +} +} \ No newline at end of file diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/FZ.java" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/FZ.java" new file mode 100644 index 0000000000000000000000000000000000000000..fc65d11d5da375c9991a0d342cfb520e7c0c44e0 --- /dev/null +++ "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/FZ.java" @@ -0,0 +1,23 @@ +import java.util.Scanner; + +public class FZ { + + public static void main(String[] args) { + // TODO Auto-generated method stub + int num1; + float num2; + double num3; + double sum; + Scanner scan =new Scanner(System.in); + System.out.println("输入int值:"); + num1=scan.nextInt(); + System.out.println("输入float值:"); + num2=scan.nextFloat(); + System.out.println("输入double值:"); + num3=scan.nextDouble(); + + sum = num1 + num2 + num3; + System.out.println("总合是:"+sum); + } +} + \ No newline at end of file diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/ZH.java" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/ZH.java" new file mode 100644 index 0000000000000000000000000000000000000000..5a1af4ca8cf1f66971582b9babd3485f51fb53cd --- /dev/null +++ "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/YCH/src/ZH.java" @@ -0,0 +1,26 @@ +import java.util.Scanner; + +public class ZH { + + public static void main(String[] args) { + // TODO Auto-generated method stub + int num1; + byte num2; + float num3; + double num4; + + Scanner scan =new Scanner(System.in); + num4 = scan.nextDouble(); + System.out.println("输入int值:"); + num1=(int)num4; + System.out.println("输入byte值:"); + num2=(byte)num4; + System.out.println("输入float值:"); + num3=(float)num4; + + double sum= num1 +num2 +num3; + + System.out.println("总和是:" ); + } + +} diff --git "a/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\215\225\345\205\203.docx" "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\215\225\345\205\203.docx" new file mode 100644 index 0000000000000000000000000000000000000000..1737f8558e1c21126ff3ae7d56e9f208893c9410 Binary files /dev/null and "b/Java\347\254\254\344\270\211\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/\350\256\241\347\256\227\346\234\272\345\255\230\345\202\250\345\215\225\345\205\203.docx" differ diff --git "a/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Jox.java" "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Jox.java" new file mode 100644 index 0000000000000000000000000000000000000000..ec1e633e4534697e52eea88cd5ceac5c82651d44 --- /dev/null +++ "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Jox.java" @@ -0,0 +1,19 @@ +package commen1; + +import java.util.Scanner; + +public class Jox { + + public static void main(String[] args) { + // TODO Auto-generated method stub + int a; + + Scanner scan=new Scanner(System.in); + System.out.println("请输入数值:"); + a=scan.nextInt(); + int b = a % 2 != 0 ? "这个数是奇数" : "这个是是偶数"; + + System.out.println("这个数是"+b); + } + +} diff --git "a/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Ln.java" "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Ln.java" new file mode 100644 index 0000000000000000000000000000000000000000..50e4ece92aef3c2ffecd9cef42ffa68a03ac2fc3 --- /dev/null +++ "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Ln.java" @@ -0,0 +1,19 @@ +package commen1; + +import java.util.Scanner; + +public class Ln { + + public static void main(String[] args) { + // TODO Auto-generated method stub + Scanner scan=new Scanner(System.in); + System.out.println("请输入年份:"); + int a=scan.nextInt(); + if ((a%4==0) || (a%400==0) && (a%100==0)) { + System.out.println("此年份是润年"); + }else { + System.out.println("此年份不是润年"); + } + } + +} diff --git "a/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Sghs.java" "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Sghs.java" new file mode 100644 index 0000000000000000000000000000000000000000..68b7db567025172626e9b631a5c25b355dc8c58c --- /dev/null +++ "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Sghs.java" @@ -0,0 +1,18 @@ +package commen1; + +import java.util.Scanner; + +public class Sghs { + + public static void main(String[] args) { + // TODO Auto-generated method stub + int a=150; + int b=210; + int c=165; + Scanner scan=new Scanner(System.in); + int d=a>b ?a:b; + int e=d>c ?d:c; + System.out.println("身高最高的是:"+e +"cm"); + } + +} diff --git "a/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Yhdl.java" "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Yhdl.java" new file mode 100644 index 0000000000000000000000000000000000000000..8b681199a196420c690d770ad8c81e3462d3a368 --- /dev/null +++ "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Yhdl.java" @@ -0,0 +1,26 @@ +package commen1; + +import java.util.Scanner; + +public class Yhdl { + + public static void main(String[] args) { + // TODO Auto-generated method stub + Scanner scan=new Scanner(System.in); + System.out.println("请输入用户名:"); + int a=scan.nextInt(); + System.out.println("请输入密码:"); + int b=scan.nextInt(); + + System.out.println("请再次输入密码:"); + int c=scan.nextInt(); + if (b==c){ + System.out.println("恭喜您,注册成功"); + } + if (b!=c){ + System.out.println("对不起,您两次输入的密码不一致,请重新输入"); + } + + } + +} diff --git "a/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Zxz.java" "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Zxz.java" new file mode 100644 index 0000000000000000000000000000000000000000..81f17611271680aa63ff19c5daed65b739b27eda --- /dev/null +++ "b/Java\347\254\254\344\272\224\346\254\241\344\275\234\344\270\232/\345\217\266\351\231\210\350\276\211/Zxz.java" @@ -0,0 +1,20 @@ +package commen1; + +import java.util.Scanner; + +public class Zxz { + + public static void main(String[] args) { + int a; + int b; + Scanner scan=new Scanner(System.in); + System.out.println("请输入第一位数"); + a=scan.nextInt(); + System.out.println("请输入第二位数"); + b=scan.nextInt(); + int c=a