beyondgrader.com Logo
DemoBrowseAboutTeamLogin

A Generous Curve

Geoffrey Challen // 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!)