package com.etc.work; import java.util.Scanner; public class Question1 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.print("请输入第一个数:"); double inputNum1=sc.nextDouble(); System.out.print("请输入第二个数:"); double inputNum2=sc.nextDouble(); double add=inputNum1+inputNum2; double subtract=inputNum1-inputNum2; double multiply=inputNum1*inputNum2; double eliminate=inputNum1/inputNum2; double surplus=inputNum1%inputNum2; System.out.println("这两个数的和为:"+add); System.out.println("这两个数的商为:"+eliminate); System.out.println("这两个数的积为:"+multiply); System.out.println("这两个数的差为:"+subtract); System.out.println("这两个数的余为:"+surplus); } }