From d2250abaae8babdef154c4a7153e2a915540b297 Mon Sep 17 00:00:00 2001 From: kennethcheng Date: Tue, 15 Sep 2026 11:33:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:ChatGPT=E7=AC=AC=202=20=E8=AF=BE=EF=BC=9AS?= =?UTF-8?q?cala=20=E5=87=BD=E6=95=B0=E4=B8=8E=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/scala/practise2/comprehensive/Comprehensive.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/practise2/comprehensive/Comprehensive.scala b/src/main/scala/practise2/comprehensive/Comprehensive.scala index 68b3151..f2398fc 100644 --- a/src/main/scala/practise2/comprehensive/Comprehensive.scala +++ b/src/main/scala/practise2/comprehensive/Comprehensive.scala @@ -1,4 +1,5 @@ package practise2.comprehensive + /* 练习 6:综合题 ⭐ @@ -19,15 +20,14 @@ age 是 Int score 是 Int 函数返回 String 评价部分使用 if -不要在函数里面直接 println -*/ +不要在函数里面直接 println*/ object Comprehensive { def main(args: Array[String]): Unit = { val result = describeStudent("Tom", 22, 85) println(result) } - def describeStudent(name: String, age: Int, score: Int): String ={ + def describeStudent(name: String, age: Int, score: Int): String = { val evaluate = if (score >= 90) { "优秀" } else if (score >= 80) {