Kotlinlearncs.online LogoJava
Return to List

Solve: A Generous Curve

Created By: Geoffrey Challen
/ Version: 2020.8.0

Assume that three int variables have been declared and initialized: yourScore, extraCredit, and topGradeThreshold. Write a conditional expression that prints:

  • "A+" if yourScore is greater than topGradeThreshold, otherwise
  • "A" if yourScore plus extraCredit is greater than topGradeThreshold, otherwise
  • "A-"

(Our curve is not this generous, but students do do very well in this class. So will you!)

Related Lessons

Stuck? You may find these lessons helpful: