public static void main(String[] args) {
		char again;
		int n;
		do{
			print("Enter the dimension of the matrix: ");
			n = scan.nextInt();
			double[][] matrix = new double[n][n];
			print("\nEnter the matrix data:\n");
			input(matrix);
			if(det(matrix)==0){
				print("\nThe matrix is singular.\n");
			}else{
				print("\nThe inverse is:\n");
				print(inverse(matrix));
				print("\n");
				print(multiply(matrix,inverse(matrix)));
			}
			print("\nContinue?(Y/N): ");
			again = scan.next().charAt(0);
		}while(again == 'y' || again == 'Y');
	}