0

i wantto builda GPA in C# and want to a condtion which chek the value from user input. chek it if it is greater then 70 show A GRADE greater then 50 show B GRADE like and print it and also set is this char type value to switch and calculate the piont like

 /*  
    switch(GRADE)
    {
    case 'A':
    points = hours * 4;
    break;
    case 'B':
    points = hours * 3;
    break;
    }
    Consol.WriteLine(GRADE);
   Consol.WriteLine(GPA);
*/this just an idea
3
Contributors
3
Replies
23
Views
3 Years
Discussion Span
Last Post by Ihteshamullhaq
0

Do you mean something like this:

if (userinput > 70) GRADE = "A";
else if (userinput > 50) GRADE = "B";
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.