Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a program to do Grading of Students #11

Closed
saurabhGr opened this issue Oct 7, 2023 · 4 comments
Closed

Write a program to do Grading of Students #11

saurabhGr opened this issue Oct 7, 2023 · 4 comments
Assignees
Labels

Comments

@saurabhGr
Copy link
Owner

saurabhGr commented Oct 7, 2023

Indiana University has the following grading policy:

Every student receives a in the inclusive range from to .
Any less than is a failing grade.
Sam is a professor at the university and likes to round each student's according to these rules:

If the difference between the and the next multiple of is less than , round up to the next multiple of .
If the value of is less than , no rounding occurs as the result will still be a failing grade.
Examples

round to (85 - 84 is less than 3)
do not round (result is less than 40)
do not round (60 - 57 is 3 or higher)
Given the initial value of for each of Sam's students, write code to automate the rounding process.

gradingStudents has the following parameter(s):

int grades[n]: the grades before rounding
Returns

int[n]: the grades after rounding as appropriate
Input Format

The first line contains a single integer, , the number of students.
Each line of the subsequent lines contains a single integer, .

Constraints

Sample Input 0

4
73
67
38
33
Sample Output 0

75
67
40
33
Explanation 0

Student received a , and the next multiple of from is . Since , the student's grade is rounded to .
Student received a , and the next multiple of from is . Since , the grade will not be modified and the student's final grade is .
Student received a , and the next multiple of from is . Since , the student's grade will be rounded to .
Student received a grade below , so the grade will not be modified and the student's final grade is .

@nida242004
Copy link
Contributor

I'd like to contribute to this code, please assign this to me @saurabhGr

@hackrahul001
Copy link

I wanted to contribute on this one.

@Patelg5606
Copy link
Contributor

Hey @saurabhGr I also want to contribute to this.

@nida242004
Copy link
Contributor

Please review #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants