SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. import java.util.Scanner;
  3.  
  4. public class MarksEntry {
  5.     public static void main(String[] args) {
  6.         Scanner scanner = new Scanner(System.in);
  7.         String[] sub = {"Maths", "Physics", "Chemistry"};
  8.         int[][] marks = new int[30][sub.length];
  9.  
  10.         for (int i=0;i<marks.length;i++){
  11.             System.out.println("Hello Student #"+(i+1));
  12.             for (int j=0;j<3;j++){
  13.                 System.out.println("Enter Marks Of " + sub[j]);
  14.                 marks[i][j]=scanner.nextInt();
  15.             }
  16.         }
  17.         System.out.println("Details:\nSN\tMaths\tPhyics\tChemistry");
  18.         for (int i=0;i<marks.length;i++){
  19.             System.out.print((i+1)+"\t");
  20.             for (int j=0;j<3;j++){
  21.                 System.out.print(marks[i][j]+"\t\t");
  22.             }
  23.             System.out.println();
  24.         }
  25.     }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top