Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include const float EVERY_BAGEL_COST = 1.99; const float BLUE_BAGEL_COST = 1.99; const float GARLIC_BAGEL_COST = 1.99; const float CREAM_CHEESE_COST = 2.99; const float COFFEE_COST =

#include  const float EVERY_BAGEL_COST = 1.99; const float BLUE_BAGEL_COST = 1.99; const float GARLIC_BAGEL_COST = 1.99; const float CREAM_CHEESE_COST = 2.99; const float COFFEE_COST = 3.99; int main() { char choice; int cnt; double total_charges = 0.0; double charges_every = 0.0; double charges_blueberry = 0.0; double charges_garlic = 0.0; double charges_cream = 0.0; double charges_coffee = 0.0; printf("Please pick one item from the me ");nu: printf("Enter A for Everything Bagel "); printf("Enter B for Blueberry Bagel "); printf("Enter C for Garlic Bagel "); printf("Enter D for Cream Cheese "); printf("Enter E for coffee "); printf("Enter F for quit "); printf("Please enter your choice of food: "); // get the choice scanf("%c", &choice); if ((choice < 'A') || (choice > 'F')) { printf("Enter a choice between A to F or a to f: "); } if (choice == 'A') { printf("Enter the count = "); scanf("%d", &cnt); charges_every += cnt * EVERY_BAGEL_COST; printf("charges_every: %f ", charges_every); } else if (choice == 'B') { } }

Please add the if statements for options b through f and the corresponding values to get the correct product.

In C code (not C++ or java)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions