Topic: Matrix Manipulation Problem / Level: beginner

Problem: Write a program to replace all prime elements in the matrix with -1 and all composite elements with 1.

Run the code to see the output here...