/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package listaexercicios;

/**
 *
 * @author awolf
 */
public class Questao35 {

    public static void main(String[] args) {
        int mat[][] = {
            {1, 1, 1, 5, 5, 5, 5, 5, 5, 5},
            {1, 1, 1, 5, 5, 5, 5, 5, 5, 5},
            {2, 2, 2, 2, 2, 2, 2, 2, 5, 5},
            {2, 2, 2, 2, 2, 2, 2, 2, 5, 5},
            {3, 2, 2, 2, 2, 2, 5, 5, 5, 5},
            {3, 2, 2, 2, 2, 4, 4, 6, 6, 6},
            {3, 2, 2, 2, 4, 4, 4, 6, 6, 6},
            {3, 4, 4, 4, 4, 4, 4, 6, 6, 6},
            {4, 4, 4, 4, 4, 4, 4, 6, 6, 6},
            {4, 4, 4, 4, 4, 4, 4, 6, 6, 6}
        };

        int linha = Entrada.leiaInt("Qual a linha ");
        while (linha < 1 || linha > 10) {
            System.out.println("Linha Inválida (1 a 10)");
            linha = Entrada.leiaInt("Qual a linha ");
        }

        int coluna = Entrada.leiaInt("Qual a Coluna ");
        while (coluna < 1 || coluna > 10) {
            System.out.println("Coluna Inválida (1 a 10)");
            coluna = Entrada.leiaInt("Qual a Coluna ");
        }

        System.out.print("O quadrante é");
        System.out.println(mat[linha - 1][coluna - 1]);

    }

}
