Question: Please help me to answer the question in C++ language: Complete the following code fragment by writing code to print the contents of the following
Please help me to answer the question in C++ language:
Complete the following code fragment by writing code to print the
contents of the following four variables.
The output should appear formatted exactly as follows
(2 decimal places aligned on the decimal place):
Note that this is just example data - other data values can occur.
Hamburger 8.50
Steak 22.95
// data values for meal names can range from 4 to 12 characters
string mealName1;
string mealName2;
// data values for meal prices can range from 0.99 to 999.99
double mealPrice1;
double mealPrice2;
// The code to set the meal variables goes here,
// but is not shown (you do not need to code this)
// Your code to print the output would go here, but type it as the answer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
