文章浏览阅读2.4k次。@Testpublic void test7(){ int a = 0; int b = 0; int sum = 0; int sum1 =0; System.out.println("请输入数字a:"); a = new Scanner(System.in).nextInt(); System.out.println("请输入数字b:"); b = new Scanner(System.in).nextInt(); if(a+b>=100){ su......
文章浏览阅读765次。(注意:要判断除数是不是0,如果为0,要报出提示信息(“0不能作为除数”))。public static void main(String[] args) { System.out.println("请输入数字1:"); int num = new Scanner(System.in).nextInt(); System.out.println("......