自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 day01

import java.util.Scanner;public class Test { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String a = scanner.nextLine(); String[] str = a.split(" "); int left = 0; ...

2022-04-19 17:07:57 129

原创 打印水仙花数

public class TestDemo { public static void main(String[] args) { for (int i = 0; i < 999_999; i++) { int tmp=i; int count=0;//计算当前数字i有多少位 while (tmp!=0){ count++; tmp/=10;.

2022-04-09 14:39:47 55

原创 求最大公约数

import java.util.Scanner;public class TestDemo { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); int n1= scanner.nextInt(); int n2= scanner.nextInt(); int m=n2%n1; while (m!..

2022-04-09 14:12:26 40

原创 判断是不是素数

package ozz;import java.util.Scanner;public class TestDemo { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); int n= scanner.nextInt(); int i = 2; for (; i < n; i++) { ..

2022-04-05 15:37:56 54

原创 实现模拟登录

编写代码模拟三次密码输入的场景。 最多能输入三次密码,密码正确,提示“登录成功”,密码错误, 可以重新输 入,最多输入三次。三次均错,则提示不能再输入。package ozz;import java.util.Scanner;public class TestDemo { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); int count = 3

2022-04-05 13:50:30 149

原创 Java实现猜数字游戏

public class TestDemo { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Random random = new Random(); int num = random.nextInt(100);//[0,100) while (true){ System.out.print.

2022-04-03 21:33:46 3016

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除