java |
您所在的位置:网站首页 › 两个不为零的数相除除数什么时商就大于被除数 › java |
Goland The selected directory is not a valid home for Go Sdk
是谁在敲打我的头: 我以为是idea不识别高版本go环境了,差点要更新idea。给力 Goland The selected directory is not a valid home for Go Sdk牙小木: nice ,very 的 java_异常_练习题:处理输入非数字异常和除数为0的异常。春水映梨花❀: public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int c = 0; try { System.out.println("请输入第一个数"); int a = scanner.nextInt(); System.out.println("请输入第二个数"); int b = scanner.nextInt(); c = a / b; } catch (ArithmeticException e) { System.out.println("除数不能为0"); } catch (InputMismatchException e) { System.out.println("请输入数字"); } System.out.println(c); } } Goland The selected directory is not a valid home for Go Sdk白告lili: 表白博主,这个问题困扰我一下午了,气死我了 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |