Answer to Question #12667 in C# for Onkabetse Gaolemogwe

Question #12667
write a program using a switch case to find the student grade
1
Expert's answer
2012-08-09T07:35:46-0400
using System;
using System.Collections.Generic;
using
System.Linq;
using System.Text;
using System.Data;

namespace
q12667
{
class Program
{
static void Main(string[]
args)
{
Console.Write("Enter student points (50, 65,
80, 95): ");
int points =
Int32.Parse(Console.ReadLine());
Console.Write("Student grade:
");
switch(points)
{
case 50:
Console.Write("D"); break;
case 65: Console.Write("C");
break;
case 80: Console.Write("B"); break;

case 95: Console.Write("A"); break;
default:
Console.Write("unknown"); break;
}

Console.ReadKey();
}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS