Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

these characters go into notepad: b c a a $ k d d f a a # q a s * c d a a b c b

ID: 3614460 • Letter: T

Question

these characters go into notepad: b
c
a
a
$
k
d
d
f
a
a
#
q
a
s
*
c
d
a
a
b
c
b
a
)
c
a
d
a
+
b
a
d
f
a
a

Perform the following
Keep track of passing grades (a,b,c)
Keep track of failing grades (d,f)
Keep track of all valid grades in the file (a-d and f)
Print any erroneous data (characters besides a-d and f)
Keep track of the number of characters in the file

Sample Output:
g $ 5 - # k z q
There were 30 passing grades
There were 12 failing grades
There were 42 valid grades
There were total of 50 characters in the file
these characters go into notepad: b
c
a
a
$
k
d
d
f
a
a
#
q
a
s
*
c
d
a
a
b
c
b
a
)
c
a
d
a
+
b
a
d
f
a
a

Perform the following
Keep track of passing grades (a,b,c)
Keep track of failing grades (d,f)
Keep track of all valid grades in the file (a-d and f)
Print any erroneous data (characters besides a-d and f)
Keep track of the number of characters in the file

Sample Output:
g $ 5 - # k z q
There were 30 passing grades
There were 12 failing grades
There were 42 valid grades
There were total of 50 characters in the file

Explanation / Answer

please rate - thanks please rate - thanks #include #include using namespace std; int main() {int pass=0,fail=0,valid=0,total=0; char ch; ifstream in; in.open("input.txt");          //open file if(in.fail())            //is it ok?    { cout