Hi, I'm having problems with this assignment. First off a Markov matrix is simply a 3x3 matrix that when the rows are added always equal 1. I am suppose to write a program to prompt the user to enter a matrix and then it is determined wether or not that matrix is a markov matrix.
This is where im at:
import java.util.*;
public class MarkovMatrix
{
public static void main (String args [])
{
int [][] matrix = new int [3][3];
Scanner input = new Scanner (System.in);
System.out.println("Enter" + matrix.length + "rows and " + matrix[0].length + "columns");
for (int i=0 ; i < matrix.length; i++){
for(int j=0 ; j < matrix[i].length; i++)
{
matrix[i][j] = input.nextInt();
}
}
}
public static boolean isMarkovMatrix(double [][]m)
{
for()
}
}
any help is mucho appreciated