Page 1 of 1

Q/ Write a Pseudocode for this program. public static void main(String[] args) { Scanner sc = new Scanner(System.in);

Posted: Fri May 20, 2022 11:05 am
by answerhappygod
Q/ Write a Pseudocode for this program.
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int i,j,size;

System.out.println("Enter the size of the matrix
(n×n):");
size = sc.nextInt();


int[][] matrix = new int[size][size];

System.out.println("Enter the elements of the matrix")
;
for(i=0;i<size;i++)
{
for(j=0;j<size;j++)
{
matrix[j] = sc.nextInt();
}
}

System.out.println("The elements of the matrix")
;
for(i=0;i<size;i++)
{
for(j=0;j<size;j++)
{
System.out.print(matrix[j]+"\t");
}
System.out.println("");
}
System.out.println();
int[][] product = multiplyMatrix(matrix, matrix, size,
size);
printMatrix(product);

System.out.println();

isReflexive(matrix);
isIrreflexive(matrix);
isSymmetric(matrix);
isAsymmetric(matrix);
isAntisymmetric(matrix);
isTransitive(matrix);
if(isequivalence())

System.out.println("equivalence");
else
System.out.println("Not
equivalence");
THE OUTPUT LOOKS:

Q Write A Pseudocode For This Program Public Static Void Main String Args Scanner Sc New Scanner System In 1
Q Write A Pseudocode For This Program Public Static Void Main String Args Scanner Sc New Scanner System In 1 (16.49 KiB) Viewed 49 times
Enter the size of the matrix (nxn): 3 Enter the elements of the matrix 1 1 1 001 0 0 1 The elements of the matrix 1 1 1 0 0 1 1 0 0 Multiplication of two matrices: 1 1 3 0 1 0 1 Not reflexive Not irreflexive Not Symmetric Not Asymmetric Antisymmetric transitive Not equivalence