# Mr. marko_svaljek

on
The input file is just a Notepad file wich has different scores:
Scores.txt
100
56
98
74
86
90
And the output file is rpt.txt with the numeric grade first and then the letter that correspond to that numeric grade, and at the end I need the average numeric grade "rounded" as an integer using the round fuction. Example: Average of 87.8 should print 88
NUMERIC      LETTER
XXX          X
XXX          X

XXX          X   AVERAGE
Thanks
Sylvester

Write a function called Grader that takes a numeric score and returns a letter grade. Grader has one argument of type integer and returns a value of type Char.
Use the rules that 90-100=A, 80-90=B, etc.
Embed the function in a program that has an input controlled loop which reads the numeric score and writes the numeric ad letter grades to a file plus writes the class average as a numeric and a letter grade.
NUMERIC      LETTER
XXX          X
XXX          X

XXX          X   AVERAGE
Average numeric grade is "rounded" and is an integer.
Use Pascal's built-in ROUND function.
Example: Average of 87.8 should print 88

Thanks
Comment
Watch Question

Do more with

EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Quid, Me Anxius Sum?  Illegitimi non carborundum.

Commented:
Cough

We don't do homework.

Post some code first and let us see what you have done.  Then we'll give advice.

Commented:
You will need:

- "Round()" to convert the floating-point value to an integer value.

- "Case ... Of" construct to take apart the different grade types.

Really easy.
Commented:
I'll try to give soulution.
It has been a while since I pogrammed in Pacal

var temp:char;
begin
end;

But I need to know more about the structure of your input file!
Is there a constant number of grades for each student or...
Do I need to output data into same file?

Waiting

Commented:
The input file is just a Notepad file wich has different scores:
Scores.txt
100
56
98
74
86
90
And the output file is rpt.txt with the numeric grade first and then the letter that correspond to that numeric grade, and at the end I need the average numeric grade "rounded" as an integer using the round fuction. Example: Average of 87.8 should print 88
NUMERIC      LETTER
XXX          X
XXX          X

XXX          X   AVERAGE
Thanks
Sylvester

Write a function called Grader that takes a numeric score and returns a letter grade. Grader has one argument of type integer and returns a value of type Char.
Use the rules that 90-100=A, 80-90=B, etc.
Embed the function in a program that has an input controlled loop which reads the numeric score and writes the numeric ad letter grades to a file plus writes the class average as a numeric and a letter grade.
NUMERIC      LETTER
XXX          X
XXX          X

XXX          X   AVERAGE
Average numeric grade is "rounded" and is an integer.
Use Pascal's built-in ROUND function.
Example: Average of 87.8 should print 88

Thanks

Commented:
This was may first answered question!
Thank you.

;)

Do more with