using System;
class Addition
{
int H,E,M,sc,sn,so=0;
int sum=0;
float per=0;
public void insert()
{
Console.WriteLine("Enter your Value of Hindi");
H=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of English");
E=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of Maths");
M=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of Science");
sc=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of Sanskrit");
sn=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of Social Science");
so=Convert.ToInt32(Console.ReadLine());
}
public void result()
{
sum=H+E+M+sc+sn+so;
per=sum*100/600;
}
public void print()
{
Console.WriteLine("Your Total is: "+sum+" And Your Percentage is: "+per);
}
}
class Implementation
{
public static void Main(string[] arg)
{
Addition obj=new Addition();
obj.insert();
obj.result();
obj.print();
Console.Read();
}
}
class Addition
{
int H,E,M,sc,sn,so=0;
int sum=0;
float per=0;
public void insert()
{
Console.WriteLine("Enter your Value of Hindi");
H=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of English");
E=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of Maths");
M=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of Science");
sc=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of Sanskrit");
sn=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter your Value of Social Science");
so=Convert.ToInt32(Console.ReadLine());
}
public void result()
{
sum=H+E+M+sc+sn+so;
per=sum*100/600;
}
public void print()
{
Console.WriteLine("Your Total is: "+sum+" And Your Percentage is: "+per);
}
}
class Implementation
{
public static void Main(string[] arg)
{
Addition obj=new Addition();
obj.insert();
obj.result();
obj.print();
Console.Read();
}
}