- 1
How to create a program that will input grades and determine if it is passed or failed?
And also assume that the passing grade is 75 and above, thank you in advance I will make your response as reviewer
9 ответов
+ 2
Look into ToUpper() method.
+ 1
Please share your attempt for any help.
+ 1
Avinesh thank you so muchhhh❤️❤️❤️❤️
+ 1
Joyce you're welcome
0
char student_grade;
Console.Write("Enter the student grade: ");
student_grade = Convert.ToChar(Console.ReadLine());
switch (student_grade)
{
case 'A':
Console.WriteLine("Excellent");
break;
case 'B':
Console.WriteLine("Very Good");
break;
case 'C':
Console.WriteLine("Good");
break;
case 'D':
Console.WriteLine("Keep it up");
break;
case 'E':
Console.WriteLine("Poor");
break;
case 'F':
Console.WriteLine("Very Poor");
break;
default:
Console.WriteLine("Invalid GRADE");
0
Avinesh that's my first try but it didn't work and I don't know what's the error huhu
0
Avinesh what if my program can accept small letter too?? What will I add?
0
EliSucco that is not quite as efficient as only testing one case via ToLower() or ToUpper()