using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.Specialized;
using System.Collections;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Hashtable ht = new Hashtable();
int __english_max_marks = 100;
int __maths_max_marks = 100;
int __science_max_marks = 100;
do
{
Console.WriteLine("");
Console.Write("Enter Name Of Student : ");
string studentName = Console.ReadLine();
ArrayList al = new ArrayList();
int[] ArrMarks = new int[3];
Console.Write("Enter Marks Of English : ");
int.TryParse(Console.ReadLine(), out ArrMarks[0]);
Console.Write("Enter Marks Of Maths : ");
int.TryParse(Console.ReadLine(), out ArrMarks[1]);
Console.Write("Enter Marks Of Science : ");
int.TryParse(Console.ReadLine(), out ArrMarks[2]);
ht.Add(studentName, ArrMarks);
Console.WriteLine("Would You Like To Read More Records ? Y/N");
}
while (Console.ReadKey().KeyChar.ToString().ToUpper() == "Y");
Console.WriteLine("");
Console.WriteLine("");
foreach (string sk in ht.Keys)
{
int[] Arr = (int[])ht[sk];
int all_marks = __english_max_marks + __maths_max_marks + __science_max_marks;
float __percent = ((Arr[0] + Arr[1] + Arr[2]) * 100) / all_marks;
Console.WriteLine(sk + " : " + __percent + " %");
}
Console.WriteLine("");
Console.WriteLine("Press a key to Quit !");
Console.ReadKey();
}
}
}