In an examination, you have appeared for three subjects such as, physics, chemistry and biology. Write a program in java to calculate the average marks and finally display it in round of form.
Answers
import java.util.*;
public class Average_Mark
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
double p,c,b,a,r;
System.out.println("Enter the marks obtained in physics");
p=in.nextDouble();
System.out.println("Enter the marks obtained in chemistry");
c=in.nextDouble();
System.out.println("Enter the marks obtained in biology");
b=in.nextDouble();
a=(p+c+b)/3;
r=Math.round(a);
System.out.println("The average mark is"+r);
}
}
Explanation:
attitude is associated with character or virtues; aptitude is associated with competence. While attitude underpins the character, virtues and moral values; aptitude determines if the person would develop desired skills to do a task. While attitude is only mental; aptitude is both mental and physical.Aug 15, 2016
https://www.gktoday.in › difference...