this will go in 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
ID: 3614428 • Letter: T
Question
this will go in notepad bc
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
I have to read the characters from a file Perform the following: Keep track of passing grades (a,b,c) Keep track of failing grade (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 a total of 50 characters in the file
this will go in 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 this will go in 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
I have to read the characters from a file Perform the following: Keep track of passing grades (a,b,c) Keep track of failing grade (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 a total of 50 characters in the file
Explanation / Answer
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? { coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.