package li2_9;import java.io.InputStream;public class Scanner { public static void main(String[] args){ Scanner input=new Scanner(System.in); //这有问题 System.out.println("请输入第一个数:"); float num1=input.nextFloat(); //这也有问题 System.out.println("请输入第二个数:"); float num2=input.nextFloat(); //还有这 float addresult=num1+num2; float minresult=num1-num2; float multiresult=num1*num2; float divresult=num1/num2; float remresult=num1%num2; System.out.println("相加结果:"+addresult+"相减结果:"+minresult+"相乘结果:"+multiresult+"相除结果:"+divresult+"求余结果:"+remresult); } }
添加回答
举报
0/150
提交
取消