Programming contests

50 Programming Exercise for Beginners

January 2, 2019 12:00 AM – December 31, 2019 12:00 AM

Grading #2

Write a program that will help you grade the students’ achievements. The maximum score available on the test is 100 points, and the student’s mark is

  • excellent if he scored at least 80 points;
  • good if he scored at least 70 points but did not reach 80 points;
  • satisfactory if he scored at least 60 points but did not reach 70 points;
  • pass it he scored at least 50 points but did not reach 60 points;
  • fail if he did not reach 50 points.

Input Specification

Each line of the input contains a student’s score between 0 and 100. The input is terminated by end-of-file (EOF).

Output Specification

For each student, the program should write exactly one line to the standard output, which contains the mark he achieved, that is, one of „jeles”, „jo”, „kozepes”, „elegseges” and „elegtelen”(the Hungarian counterparts of „excelent”, „good”, „satisfactory”, „pass” and „fail” respectively).

Sample Input

  1. 45
  2. 90
download as text file

Output for Sample Input

  1. elegtelen
  2. jeles
download as text file

One possible solution is available in: main.c.

Acknowledgement This work was supported by the construction EFOP-3.4.3-16-2016-00021. The project was supported by the European Union, co-financed by the European Social Fund.
University of Debrecen; Faculty of Informatics; v. 03/01/2019