Question: Write a script file that prompts the user to enter a matrix. Uses a for loop and if-else statements if required to count how many

 Write a script file that prompts the user to enter a

Write a script file that prompts the user to enter a matrix. Uses a for loop and if-else statements if required to count how many numbers in the matrix are multiples of 2, multiples of 3 and multiples of 4. The script should then display the resulting count as shown below to 3 decimal places. The only built in functions allowed in your function file are fprintf, size, rem, and mod. Test your code using the matrix produced from the following code: A- magic(6) 3. The matrix contains 18.000 multiples of 2 The matrix contains 13.000 multiples of 3 The matrix contains 9.000 multiples of 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!