Advertisement
remote87

matrix sum start

Nov 30th, 2020
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner scan = new Scanner(System.in);
  9.         int rows = 11;
  10.         int cols = 11;
  11.  
  12.         while (rows > 10){
  13.             System.out.print("Брой редове: ");
  14.             rows = Integer.parseInt(scan.nextLine());
  15.         }
  16.        
  17.         while (cols > 10){
  18.             System.out.println("Брой колони: ");
  19.             cols = Integer.parseInt(scan.nextLine());
  20.         }
  21.  
  22.         int[][] matrix = new int[rows][cols];
  23.        
  24.         for(int i = 0; i < rows; i++){
  25.             for(int j = 0; j < cols; j++){
  26.                
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement