Question #60244

write a program in java to display your name and average marks obtained in physics ,chemistry, biology.

Expert's answer

class Main{
public static void main(String args[]){
String name = "John Snow";
int physics = 98, chemistry = 94, biology = 86;
System.out.println(name);
System.out.println((physics + chemistry + biology) / 3);
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS