import java.util.Scanner;
class Extra
{
public Extra()
{
System.out.println("U r at constructor ");
}
public void Test()
{
Scanner d=new Scanner(System.in);
System.out.println("Enter the makrs of English: ");
int e=d.nextInt();
System.out.println("Enter the makrs of Physics : ");
int p=d.nextInt();
System.out.println("Enter the makrs of Chymistry: ");
int c=d.nextInt();
System.out.println("Enter the makrs of Mathamatics: ");
int m=d.nextInt();
System.out.println("Enter the makrs of Biology: ");
int b=d.nextInt();
System.out.println("Enter the makrs of Arbic: ");
int a=d.nextInt();
int t=e+p+c+m+b+a;
System.out.println("Total ="+t);
double per =t/6;
System.out.println("Percentage is "+per);
}
}
class Constructor
{
public static void main(String ar[])
{
Extra mm = new Extra();
mm.Test();
}
}
Output: