BlueBook
p307ex7: Grades
Given T (1 ≤ T ≤ 100) integers in the range (-1000, 1000), representing percentages, calculate which letter grade each of them correspond to.
The mark table is as follows :
Grade | Marks Range |
A | 80 - 100 |
B | 70 - 79 |
C | 60 - 69 |
D | 50 - 59 |
F | 0 - 49 |
X | Anything else... |
Input
Line 1 : One integer T
Lines 2 .. T + 1 : One integer N
Output
Lines 1 .. T : One character denoting the letter grade received.
Sample Input
3
10
99
101
Sample Output
F
A
X
All Submissions
Best Solutions
Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 28, 2008
Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3
Comments (Search)
135234.pas(1,3) Fatal: Syntax error, \"BEGIN\" expected but \"identifier AR\" found
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled)
1. where's your loop?
2. else if don't use semicolon until the last statement
3. where is your else if? you did not even put an if in front of some of the blah>blah thingies.
4. You need parentheses for the blah>blah thingies.
There are probably many more errors that I did not say