1.第一个返回值是object,第二个返回值是undefined
return后面紧跟换行 系统会给他默认后面加一个;
2。
- CREATE TABLE student_score(
name VARCHAR(20),
course VARCHAR(10),
score INT(10)
);
INSERT INTO student_score VALUES('张三','语文',81);
INSERT INTO student_score VALUES('张三','数学',75);
INSERT INTO student_score VALUES('李四','语文',76);
INSERT INTO student_score VALUES('李四','数学',90);
INSERT INTO student_score VALUES('王五','语文',81);
INSERT INTO student_score VALUES('王五','数学',100);
INSERT INTO student_score VALUES('王五','英语',90);
SELECT name FROM student_score GROUP BY name HAVING MIN(score)>80
3.
package test;
public class Client1 {
public static double sumBallHeight(double h, int n) {
if (n == 1)
return h / 2;
else
return sumBallHeight(h / 2, n - 1);
}
public static void main(String[] args) {
System.out.println(sumBallHeight(100, 10));
}
3.
-
3CREATE TABLE student_score(
-
name VARCHAR( 20),
-
course VARCHAR( 10),
-
score INT( 10)
-
);
-
-
INSERT INTO student_score VALUES( '张三', '语文', 81);
-
INSERT INTO student_score VALUES( '张三', '数学', 75);
-
INSERT INTO student_score VALUES( '李四', '语文', 76);
-
INSERT INTO student_score VALUES( '李四', '数学', 90);
-
INSERT INTO student_score VALUES( '王五', '语文', 81);
-
INSERT INTO student_score VALUES( '王五', '数学', 100);
-
INSERT INTO student_score VALUES( '王五', '英语', 90);
-
-
SELECT name FROM student_score GROUP BY name HAVING MIN(score)> 80