➽ Problem:-
https://www.hackerrank.com/challenges/grading/problem
➽ Solution:-
#include<bits/stdc++.h>
using
namespace std;
int main()
{
int num;
cin>>num;
for(int i=0; i<num; i++)
{
int grades;
cin>>grades;
if(grades >= 38 && grades %
5 >= 3)
{
grades += 5 - grades % 5;
}
cout << grades << endl;
}
return 0;
}
0 Comments
Please do not enter any spam link in the comment section.