Create a c program-grocery checkout total


Discussion:

Create a C program: Grocery Checkout total. Implement the pseudocode developed . Insert meaningful comments at least once for every few lines of the program. Please do not use loops or arrays.

Psedocode:

prompt the user to enter the price for apple

read apple_price

prompt the user to enter the price for banana
read banana_price

prompt the user to enter the price for grades
read grapes_price

prompt the user to enter the price for pears
read pears_price

prompt the user to enter the price for tomato
read tomato_price

prompt the user to enter the weight for apple
read apple_weight

prompt the user to enter the weight for banana
read banana_weight

prompt the user to enter the weight for grades
read grapes_weight

prompt the user to enter the weight for pears
read pears_weight

prompt the user to enter the weight for tomato
read tomato_weight

compute total = apple_price * apple_weight + banana_price * banana_weight + grapes_price * grapes_weight + pears_price * pears_weight + tomato_price * tomato_weight

if total > 50
apply 5% discount
output the discount and the new total.
else
output total
endif

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Create a c program-grocery checkout total
Reference No:- TGS01933724

Now Priced at $25 (50% Discount)

Recommended (92%)

Rated (4.4/5)