Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 (25 points) A grocery store by the university makes discounts to students. If thetotal purchase is more than 250 TL thenthe discount is

image text in transcribed

Question 1 (25 points) A grocery store by the university makes discounts to students. If thetotal purchase is more than 250 TL thenthe discount is 0.12 otherwise the discount is 0.10. Afterthe discounted totalis calculated 0.18 VAT is added to find the total amount to be paid by the student customer. If the customer is a regular customer (i.e. not a student) then no discount is applied to the total purchase but 0.18 VAT is added to find the total to be paid by the regular customer. WM Write a Cprogram to calculate the total amount to be paid by the customer. The program must select if the customeris a student or a regular customerthen ask the userto enterthe total purchase amount Finally the program should do the calculations according to the customer type (student or regular customer) and display Total purchases and next to it the discount percentage and discount amount if there is any, Discounted total on the next line and finally Total amount including VAT on the last line. w Repeat the above process in a do-while loop until the time when the user replies "No" (or"N" or "n") to the question "Do you want to continue

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_2

Step: 3

blur-text-image_3

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 Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions