Skip to content

Commit

Permalink
Merge pull request #1 from Animesh-Kumar-6515/grade-selector-solution…
Browse files Browse the repository at this point in the history
…-in-cpp

Add files via upload
  • Loading branch information
Animesh-Kumar-6515 committed Oct 19, 2022
2 parents dd82f68 + ec877f3 commit b7a0f18
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Others/grade selector/grade_selector.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
char grade_selector(int score){
if(score<=30 and score>25){
return 'A'
}
else if(score<=25 and score>20){
return 'B';
}
else if(score<=20 and score>15){
return 'C';
}
else if(score<=15 and score>10){
return 'D';
}
else if(score<=10 and score>5){
return 'E';
}
else{
return 'F';
//if the score is greater than 30 then also it will return 'F'
}
}

0 comments on commit b7a0f18

Please sign in to comment.