google.com, pub-8786015629279405, DIRECT, f08c47fec0942fa0 Write a program to accept the marks of a student in Physics, Chemistry and Biology. Display the total marks and average marks.

Write a program to accept the marks of a student in Physics, Chemistry and Biology. Display the total marks and average marks.

0

public class Average
{
public static void main (String args[])
{
int p,c.b;

p=80;
c=62;
b=78;
int s;
float avg;
s=(p+c+b);
avg=s/3.0;
System.out.println("The total marks obtained="+s);
System.out.println("The average marks obtained="+avg);
}
}

Expected Output:

The total marks obtained=220
The average marks obtained=73.33



Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Thank you for your interest 😊

We will back shortly after reviewing...

Thank you for your interest 😊

We will back shortly after reviewing...

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top