Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Exam22 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- // input 3*4 numbers and store into 2D
- // array A
- Scanner sc = new Scanner(System.in);
- // rowsize colsize
- int[][] A = new int[3][4];
- for (int r=0; r<3; r++) {
- for (int c=0; c<4; c++) {
- A[r][c] = sc.nextInt();
- }
- }
- int max = Integer.MIN_VALUE;
- for (int r=0; r<3; r++) {
- for (int c=0; c<4; c++) {
- if (max<A[r][c]) {
- max = A[r][c];
- }
- }
- }
- System.out.println(max);
- // find out the biggest number inside array A
- //input 3*2 numbers and store into 2D array B
- //output col first backward
- //output row second backward
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement