Question: Write a C++ program that repeatedly inputs students scores an d determines the letter grades . The scores should be stored in a file called
Write a C++ program that repeatedly inputs students scores an
d determines the letter grades
.
The
scores should be stored in a file called
scores.txt
.
For each score, output
the
score along
with
its
letter grade. Your program should
count the number of As, Bs, etc.
Use five counters
(
a_count, b_count, etc
)
.
See main program below.
The letter grade is
determined
based on the following scale:
>=
90 (A), >= 80 (B), >= 70(C), >= 60(D), >= 0(F)
.
Output
all
frequencies.
Your program
mu
st
, at least,
include
the following functions:
A function
(
get_
grade
)
that
takes a score as a parameter and returns a letter grade.
o
char get_grade(double score);
//prototype
A void function to print the score and the grade.
o
void print_grade(double score,
char grade);
A void function to print the frequencies.
void print_frequencies(int a_count, int b_count,
int
c_
count, int d_count, intmf_count);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
