Skip to main content

Posts

Showing posts with the label Write a JAVA program to enter marks of five subjects and calculate total

ads1

JAVA PROGRAM || Write a JAVA program to enter marks of five subjects and calculate total, average and percentage.

                                                                                            JAVA PROGRAM   Write a Java program to enter marks of five subjects and calculate total, average and percentage.   (Hint)  Total = s1+s2+s3+s4+s5 Average = total/5 percentage = (total/500)*100 Static :-  class TAP {     public static void main(String args[])     {         double english=50.0,Maths=65.5,SocialScience=72.5,Science=49.0,Computer=48.5,total,average,percentage;         total=english+Maths+SocialScience + Science + Computer;         average = total/5;         percentage = (total/500)*100;         System.out.println("The total marks is :-"+total);         System.out.println("The average  is :-"+average);         System.out.println("The percentage is :-"+percentage);                  } }   Output :-      Dynamic :-  import java.util.*; class TAP {     public static void main(String args[])     {         Scanner in = new Scanner(System.in);         System.ou

ads2