Question: #include using namespace std; Collapse Conditionals -> Coding Exercises: Conditionals int main(int arge, char** argv) { 1, 2 3 4, 5 6 7 8 9

 #include using namespace std; Collapse Conditionals -> Coding Exercises: Conditionals int

#include using namespace std; Collapse Conditionals -> Coding Exercises: Conditionals int main(int arge, char** argv) { 1, 2 3 4, 5 6 7 8 9 10 4. Exercise 4 string x = argv[i]; //add code below this line Conditionals Exercise 4 11 //add code above this line return 0; 12 13 14 15 16 + 17 } Problem Use the variable x as you write this program. x will represent a string. Write a program that determines if x is a primary color (red, blue, or yellow). If yes, print |_ is a primary color, where the blank Q) is the value of x. If no, print, is not a primary color where the blank () is the value of x. For this particular exercise, make sure that your code specifically checks if the variable x is equivalent to the strings red, blue, or yellow in all lowercase. Otherwise, your test cases will fail. o IMPORTANT There is a difference between all of the following strings: "red", "Red", and "RED". When comparing strings, the system is case- sensitive and will attempt to match each character of the strings to each other based on whether it is uppercase or lowercase 0% (1:0)

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!