Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ programming please write the code and give a screenshot of the output as well Write a program to input 2D arrays of the of
c++ programming
please write the code and give a screenshot of the output as well
Write a program to input 2D arrays of the of type color that have the size (n x m) where n and nm are inputs from the user. The 2D array input values will be only (Red, Green and Blue), you should then calculate and output the sum of both matrices according to the following matrix: Red Green Blue Red Red Yellow Magenta Green Yellow Jreen Cyan Blue Magenta Cyan Blue It's required to define an enumerated data type color with members Red, Green, Blue, Yellow, Magenta, and Cyan. You should have a function called color ** readlnputint n, int m) which returns a pointer to a dynamic 2D array of type color ** and call it twice, once for each matrix You should have a function called color ** ralcResult(color **A, color **B, int n, int m) that receives both the matrices with the dimensions and calculates the output. It should return a dynamic 2D array that has the calculate output. You should have a function called void outputResultcolor **res, int n, int m) that receives any matrix with its dimensions and display it in string format to the console and use it to display the output. Output Yellow Cyan Magenta Magenta Magenta Green Cyan Yellow Magenta Input Red Green Blue Red Blue Green Green Red Blue Green Blue Red Blue Red Green Blue Green Red Red Green Blue Red Green Blue Red Green BlueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started