Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion exercises/concept/making-the-grade/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ Also being familiar with the following can help with completing the tasks:

## 3. Calculating Letter Grades

- These are _lower thresholds_. The _lower threshold_ for a "D" is a score of **41**, since an "F" is **<= 40**.
- The score needed to avoid failing is always 41, since an "F" is **<= 40**. The remaining score range, from 41 to the highest score, should be divided into four equal intervals, one for each letter grade.
- Subtract 40 from the highest score to get the total range of scores that qualify for letter grades (A to D).
- Divide this total range by 4 to get the size of each grade interval.
- Add this interval size to 40 repeatedly to calculate the lower bounds for each letter grade.
- `static_cast<int>` without parameters should round off increments nicely.
- You are expected to return an array, not a vector.

Expand Down
9 changes: 0 additions & 9 deletions exercises/concept/making-the-grade/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,6 @@ letter_grades(88);
// => {41, 53, 65, 77}
```

### How to calculate the intervals

The score needed to avoid failing is always 41.
The remaining score range, from 41 to the highest score, should be divided into four equal intervals, one for each letter grade.

- Subtract 40 from the highest score to get the total range of scores that qualify for letter grades (A to D).
- Divide this total range by 4 to get the size of each grade interval.
- Add this interval size to 40 repeatedly to calculate the lower bounds for each letter grade.

## 4. Matching Names to Scores

You have exam scores in descending order, and the respective student names (sorted in the order of their exam scores).
Expand Down