➽ Problem:-
https://www.hackerrank.com/challenges/grading/problem
➽ Solution:-
#include<stdio.h>
int main()
{
int num;
scanf("%d", &num);
for(int i=0; i<num; i++)
{
int grades;
scanf("%d", &grades);
if(grades >= 38 && grades %
5 >= 3)
{
grades += 5 - grades % 5;
}
printf("%d\n", grades);
}
return 0;
}
0 Comments
Please do not enter any spam link in the comment section.