摘要: public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("请输入:"); int a = sc.nextInt(); int random=(int)(Math.ra 阅读全文
posted @ 2019-08-20 14:48 芒果不氓 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 逻辑运算符用来连接一个或多个条件, 判断这些条件是否成立。 逻辑运算符用的结果是布尔类型 public static void main(String[] args) {} // int i= 4;// int year = 2010;// System.out.println("请输入年份");/ 阅读全文
posted @ 2019-08-20 14:46 芒果不氓 阅读(184) 评论(0) 推荐(0) 编辑
摘要: int a = 9, b = 8, c = 7; int max = 0; if (b > c) { if (b > a) { max = b; } else { max = a; } } else { if (c > a) { max = c; } else { max = a; } } Syst 阅读全文
posted @ 2019-08-20 14:41 芒果不氓 阅读(988) 评论(0) 推荐(0) 编辑
摘要: import java.util.Scanner; Scanner sc = new Scanner (System.in); int i = sc.nextInt(); String str = sc.next(); double ddd = sc.nextDouble(); char ccc = 阅读全文
posted @ 2019-08-20 14:39 芒果不氓 阅读(119) 评论(0) 推荐(0) 编辑