Advertisement
tareqmahmud9

Adib Problem 2

Feb 16th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.78 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. class Main {
  4.   public static void main(String[] args) {
  5.     Scanner scan = new Scanner(System.in);
  6.  
  7.     System.out.print("Bangla: ");
  8.     int bangla = scan.nextInt();
  9.     System.out.print("English: ");
  10.     int english = scan.nextInt();
  11.     System.out.print("Math: ");
  12.     int math = scan.nextInt();
  13.     System.out.print("Physics: ");
  14.     int physics = scan.nextInt();
  15.     System.out.print("Chemistry: ");
  16.     int chemistry = scan.nextInt();
  17.    
  18.     // Aggregate Marks
  19.     int aggregate = bangla + english + math + physics + chemistry;
  20.     System.out.println("Aggregate Number Is: " + aggregate);
  21.    
  22.     // Percentage marks
  23.     double percentage = (aggregate * 100) / 500.0;
  24.     System.out.println("Percentage marks Is: " + percentage);
  25.   }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement