Question: 2. (25 Points) Write a complete, working C++ program called euidB.cpp (where euidis your EUID) that does the following: Declare the following variables: o A

 2. (25 Points) Write a complete, working C++ program called euidB.cpp

2. (25 Points) Write a complete, working C++ program called euidB.cpp (where "euid"is your EUID) that does the following: Declare the following variables: o A string variable to store the name of an art gallery that contains no white space. o An integer variable to store an integer between 15 and 40, inclusively. o An integer variable to store the above integer value raised to a power. o A floating-point number to store the average price of all the pictures in the gallery An art gallery has 14 pictures. Declare and initialize a constant integer called PICTURES with the value 14. . Prompt for and read in the name of the art gallery as a single word, which contains no white space. Prompt for and read in an integer between 15 and 40, inclusively, using printf and scanf, respectively .Now, use the appropriate math function to raise this integral value (between 15 and 40) to the third power and store the result in the appropriate integral variable. This number represents the value of all of the pictures in the art gallery . Accurately calculate and store the average value of all the pictures contained in the art gallery using your constant declared above. Print the name of the art gallery and the average value of all the pictures in the art gallery, separated by the tab character. But be sure to include the '$' character before this average value. Due to time constraints, no comments are required in this code. Here is a sample output to help you write the code. The items in bold are entered by the user. s ./a.out Enter the single name of the art gallery: Momentum Enter an integer value between 15 and 40, inclusively: 26 Momentum $%1255 average per piece You may not get the same output since we are using random numbers

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!