Question: Complete the following program based on the comments given. The function displays the totals in the format shown below. The xs represent values entered by

 Complete the following program based on the comments given. The function

displays the totals in the format shown below. The xs represent values

entered by the user or computed by the program. The price for

an apple is RM0.85 and for an orange is RM1.00. The total

Complete the following program based on the comments given. The function displays the totals in the format shown below. The xs represent values entered by the user or computed by the program. The price for an apple is RM0.85 and for an orange is RM1.00. The total is quantity (qty) multiplied by price. Note that the unit price of the fruits should be declared as constants using preprocessor directives. Output Format: ========My Fruit Store=== Fruit Qty Price Total XX Apple Orange RMO.85 RM1.00 RMxx.xx RMXX.XX XX Total RMXX.XX Write or complete the statements at the positions marked with an arrow (->). #include #include using namespace std; 1 2 3 4 5 6-> 7 8-> 9 10 // defined constant for price per apple // defined constant for price per orange 912 1/ function prototypes void display_heading (void); 12-> 13-> 14-> 15 16 17 int main(void) { int apple_qty, orange_qty; double apple_total, orange_total, grand_total; 18 19 20 21 22 23 // get number of apples and oranges cout > apple_qty; cout > orange_qty; 24 25 26 27 28 29 30 31 // compute total for apples and oranges apple_total = apple_qty * PRICE_PER_APPLE; orange_total orange_qty * PRICE_PER_ORANGE; // compute grand total grand_total = apple_total + orange_total; 32 33 34 35-> 36-> 37-> 38 39 40 41 // call the functions to display the result display_heading(); display_apple_item( ); display_orange_item( ); display_grand_total return 0; } 42 43 void display_heading (void) { cout void display_apple_item( { ) } 51 52 53 54 55-> ) void display_orange_item( { } ) 56 57 58 59 60 61-> void display_grand_total ( { cout

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!