Computer Science, asked by anushkasingh9294, 6 months ago

12. Create a class Student_Info defines a function Result() to input marks in English, Maths,
Physics, Chemistry, Biology and Computer Applications. Print the marks obtained in all the
subjects, total marks and percentage (assume that the maximum marks in each subject is 100).​

Answers

Answered by HayasCaptain
1

Answer:

Will you be my frd please

Answered by parthr07
5

public class Student_Info

{

   float Result(float P, float C, float B, float CA, float E, float M)

   {

       float phy = P, chem = C, bio = B, comp = CA, eng = E, math = M;

       float total_marks = phy + chem + bio + comp + eng + math;

       float percentage = (total_marks * 100) / 600;

       System.out.println("Marks in Physics: "+phy);

       System.out.println("Marks in Chemistry: "+chem);

       System.out.println("Marks in Biology: "+bio);

       System.out.println("Marks in English: "+eng);

       System.out.println("Marks in Computer: "+comp);

       System.out.println("Marks in Maths: "+math);

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

       System.out.println("\nPercentage: "+percentage+"%");

       return percentage;

   }

}

Explanation:

Hope it helps!!!

Mark me as Brainliest!!!

Peace.

Similar questions