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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 48 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply