package?step1; import?java.util.Scanner; public?class?Cal?{ public?static?void?main(String[]?args)?{ ????????Scanner?input=new?Scanner(System.in); int?c,d,e,f,g; ????????int?a=input.nextInt(); ????????System.out.println("请输入第一个整数"); ????????int?b=input.nextInt(); ????????System.out.println("请输入第二个整数"); ????????c=a+b; ????????d=a-b; ????????e=a*b; ????????f=a/b; ????????g=a%b; ????????System.out.println("两数相加的结果为:"+c); ????????System.out.println("两数相减的结果为:"+d); ????????System.out.println("两数相乘的结果为:"+e); ????????System.out.println("两数相除的结果为:"+f); ????????System.out.println("两数取余数的结果为:"+g); ????????} }
|