From 0557c72d819cc15dc1e38c266767aff1e1b2b1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=9F=8E?= <2304508674@qq.com> Date: Thu, 10 Oct 2024 17:34:30 +0800 Subject: [PATCH] 6 --- Calculator.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Calculator.java b/Calculator.java index d00b121..cfcba98 100644 --- a/Calculator.java +++ b/Calculator.java @@ -4,15 +4,13 @@ import java.util.Scanner; public class Calculator { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); -<<<<<<< HEAD -======= + + System.out.print("请输入要转换的数:"); + String num = scanner.nextLine(); System.out.print("请输入源进制(2-16):"); int fromBase = scanner.nextInt(); System.out.print("请输入目标进制(2-16):"); int toBase = scanner.nextInt(); ->>>>>>> origin/master - System.out.print("请输入要转换的数:"); - String num = scanner.nextLine(); // 调用转换方法