C# program to Accept student's grade and display the equivalent description

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Collections;

using System.Threading;

using System.IO;


namespace CSharpProgram

{

    class AkbTechie

     {

            static void Main(string[] args)

           {

         char grade;

        Console.Write("Enter the Grade : ");

        grade = Convert.ToChar(Console.ReadLine().ToUpper());

        switch (grade)

        {

        case 'A':

            Console.WriteLine(" EXCELLENT");

            break;

        case 'B':

            Console.WriteLine(" VERY GOOD");

            break;

        case 'C':

            Console.WriteLine(" GOOD");

            break;

        case 'D':

            Console.WriteLine(" AVERAGE");

            break;

        case 'E':

            Console.WriteLine(" POOR");

            break;

        case 'F':

            Console.WriteLine(" POOR");

            break;

        case 'G':

            Console.WriteLine(" ABSENT");

            break;

        default:

            Console.WriteLine("ERROR IN GRADE \n");

            break;

        }

               Console.ReadKey(); 

          }

    }

}


Output:-

Enter the Grade : e

POOR


एक टिप्पणी भेजें

0 टिप्पणियाँ