Question: Write a C function sum2PN() which takes each element from the 2D integer array as a parameter and print each element expressed as the
Write a C function sum2PN() which takes each element from the 2D integer array as a parameter and print each element expressed as the sum of 2 prime numbers (all possible combinations). In the main function, read the 2-dimensional integer array, replace each element in the original array with its square if it cannot be expressed as the sum of 2 prime numbers, otherwise retain the element and display the resultant in matrix form. Original Matrix: Desired output 11 3 + 19 = 5 + 17 11 + 11 5 27 22 34 22 22 22 34 34 34 34 = - 3 5 11 17 + 31 + 29 + 23 + 17 22 Final modified Matrix 121 729 22 34
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
C program that includes the sum2PN function to pr... View full answer
Get step-by-step solutions from verified subject matter experts
