Question: IN C++ preferably Visual Studio Lab 2 Leaming Objectives Use of decisions to solve a programming problem User input and output General Description write a

 IN C++ preferably Visual Studio Lab 2 Leaming Objectives Use ofdecisions to solve a programming problem User input and output General Descriptionwrite a program that the user to select a chemical compound from

IN C++ preferably Visual Studio

Lab 2 Leaming Objectives Use of decisions to solve a programming problem User input and output General Description write a program that the user to select a chemical compound from the following it printing the selection number and compound name temperatures used interi Selection 1 2 3 Compound Freering Temp Bolting Temp Water 0 100 39 357 Mercury Octane -57 126 Ethanol -115 78 The program should determine and print the name of the selected compound. When a number that is not 1 to 1 is entered, print an error message Invalid selection, as antired and assume the user selected 1 The program then asks the user to enter a temperature, determines and prints the state solid, liquid 1 of the compound selected at the entered temperature using a message in the format compound nome at temperatures in a state state Coding Specifications No arrays or loops allowed "Naked Constants" may be used for selecting the compound, however, constants should be declared and used for the freezing/boiling points of compounds. We will assume the user enters only integer values for the selection and temperature, Sample Executions: compound List Empound Listi Water ter Mercury mercury Octane 3 Octane Ethanol 4 Ethanol Enter selection Inter selection valda selection, assuming 1 antanud. Belected compound water Selected compound water Enter treure (C) Ester temperature (C) 300 water at a temperature of 2001 in i stat Logo LIGE Mater I water Merry TEMY Orta Det 1. Ethanol | than Enter lection Frection 1 selected computer the led count Mercury Enter temperature (C) 33 tarterore CH 10 manata Batas dat Rubrics: comment box at top with student name constants declared before main displays menu and asks for selection assumes 1 was selected when a number other than 1-4 is entered and prints message er prints message about which compound was selected asks the user the enter the temperature determines the correct state using the declared constants, compound, and temperature. prints the final message in the correct format with the correct results. Vision

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!