EdocGram
Home
(current)
Topics
EdocAI
Code Editor
HTML
Javascript
PHP
Python
Python AI Code Editor
More
Contact
About
Privacy Policy
Terms and Conditions
Log In
Topic: Matrix Manipulation Problem / Level: beginner
Problem:
Write a program to print all the elements in the first diagonal of a square matrix that are multiples of 2.
More Problems
Write a program to print all the elements in the second diagonal of a square matrix that are multiples of 3.
Write a program to print all the prime numbers in the first and last rows of the matrix.
Write a program to print all the prime numbers in the first and last columns of the matrix.
Write a program to check if the sum of all diagonal elements is an odd number.
Write a program to check if the product of all border elements is an even number.
Write a program to replace all the prime elements in the matrix with their negatives.
Write a program to replace all the composite elements in the matrix with their negatives.
Write a program to count how many elements in the matrix are prime and even.
Python
Language
Editor
Run & Output
Save
AI Code Generate
AI Test Case
Run the code to see the output here...