Question: ***PLEASE DO IT IN C++*** In this lab, you will familiarize yourself with structs through a small exercise. We will be mixing the RGB values

***PLEASE DO IT IN C++***
In this lab, you will familiarize yourself with structs through a small exercise. We will be mixing the RGB values of colors together to make a new one. RGB stands for red, green and blue. Each element describes the intensity value ranging from 0-255. For example: black color will have RGB values (0, 0, 0) while white will have (255, 255, 255) Create a dynamic array of structs color. The struct contains three integers named red, green and blue. This corresponds to the RGB values of a color. For each array element, ask the user to enter the intensity value of red, green and blue. The value should be between 0 and 255 (inclusive) Additionally, compute the average of each of the red, green and blue components. For code modularity, implement a function that returns the average of each rgb component in your dynamic array. The function should take in a struct array, its length and the rgb type for which you want to compute the average. Print out the final result in the form (r, g, b), where r, g, b corresponds to each averaged value. Can you guess what color you mixed? (Note: Your program does not need to print the final color mixed)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
