0% found this document useful (0 votes)
72 views

Using Using Using Using Using Namespace: Program

The document contains code for a C# program that takes student input including name, age, and test scores in English, math, and science. It calculates the total score, percentage, and grade based on ranges of total score. The student's name, age, total score, and percentage are output along with the determined grade.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Using Using Using Using Using Namespace: Program

The document contains code for a C# program that takes student input including name, age, and test scores in English, math, and science. It calculates the total score, percentage, and grade based on ranges of total score. The student's name, age, total score, and percentage are output along with the determined grade.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{

class Program
{
static void Main(string[] args)
{

Console.WriteLine("Enter Student Name :");


String name=Console.ReadLine();
Console.WriteLine("Enter Student Age :");
int Age=Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Enter Student English :");
int En_lang = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Enter Student Math :");
int math = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("Enter Student Science :");
int scient = Convert.ToInt16(Console.ReadLine());

double sum_dagree=math + scient + En_lang; ;


double degree_precent=(sum_dagree/100*300);
Console.WriteLine("---------------------------------------------------\n");
Console.WriteLine("Name of Student : "+name);
Console.WriteLine("Student Age is : " + Age);
Console.WriteLine("obtained Marks : " + sum_dagree);
Console.WriteLine("percentage : " +sum_dagree/3);
if (sum_dagree>250 && sum_dagree<300)
Console.WriteLine("Your Grade is Very Excellent");
else if (sum_dagree > 200 && sum_dagree < 249)
Console.WriteLine("Your Grade is very good");
else if (sum_dagree > 150 && sum_dagree < 199)
Console.WriteLine("Your Grade is good ");
else if (sum_dagree > 0 && sum_dagree < 149)
Console.WriteLine("Your Grade is week");

}
}
}

You might also like