Mark

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

import java.util.

*;

class d13

public void ds()throws InputMismatchException

double a=0,b=0,c=0,d=0,e=0,p=0,tmo=0,tm=500.0;

Scanner x=new Scanner(System.in);

System.out.println("Enter Your Name");

String n=x.next();

System.out.println("Enter Mark of 1st Subject(Computer)");

a=x.nextDouble();

System.out.println("Enter Mark of 2nd Subject(Odia)");

b=x.nextDouble();

System.out.println("Enter Mark of 3rd Subject(Science)");

c=x.nextDouble();

System.out.println("Enter Mark of 4th Subject(English)");

d=x.nextDouble();

System.out.println("Enter Mark of 5th Subject(MAthematics)");

e=x.nextDouble();

tmo=a+b+c+d+e;

p=(tmo/tm)*100;

System.out.println("Name:"+n);

System.out.println("Total Marks obtained:"+tmo);

System.out.println("Percentage:"+p);

You might also like