Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

programming language: c It is the year 2035, the MarsX Space Vehicles Company has recently made its X-2 single use Space Transportation Systems (STS) available

image text in transcribed
image text in transcribed
programming language: c
It is the year 2035, the MarsX Space Vehicles Company has recently made its X-2 single use Space Transportation Systems (STS) available to the general public. Anyone can purchase the STSs to travel to the nearest celestial bodies (government permits and fees not included). The company has asked you to write a program that calculates the amount (in S) the customers owe for the purchase of the STSs. First, your program should welcome the customer with some fancy message (be creative). Then, the program must present the customer with a menu with two options as follows: Please Enter One of the Following 1- Purchase X-2 STS 2- Quit If the customer chooses option 1, prompt him/her asking how many STSs he/she would like to purchase AND if he/she is a member of the Interplanetary Travelers Club. Display the amount he/she owes, including some fancy thank you message, keeping the following in mind o If customer purchases 4 STSs or less, the cost of each STS is $1.0 10 o For all purchases above 4 STSs (5 and above), the cost of each STS is $8.0 10 o If the customer is a member of the Interplanetary Travelers Club, he/she receives an extra 10% discount and free fuel for one of the STSs (make sure to display a message informing the customer of this). o Customers cannot be allowed to enter a number smaller than The program will redisplay the menu until the customer enters option 2 (Hint: use do...while loop). If the customer enters option 2, Quit the program. Validate for incorrect inputs (Hint: use while loops). If the user enters incorrect answers 5 times quit the program. Enjoy! Sample outputs (please don't make yours exactly like this one, use some creativity): Welcome to MarsX Space Vehicles Online Store Please Enter One of the Following: 1- Purchase MXSV-2 STS 2- Quit [Enter] How Many MXSV-2 STSs Would You Like to Purchase? 10 [Enter]

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

Logic In Databases International Workshop Lid 96 San Miniato Italy July 1 2 1996 Proceedings Lncs 1154

Authors: Dino Pedreschi ,Carlo Zaniolo

1st Edition

3540618147, 978-3540618140

More Books

Students also viewed these Databases questions

Question

8. Do the organizations fringe benefits reflect diversity?

Answered: 1 week ago

Question

7. Do the organizations social activities reflect diversity?

Answered: 1 week ago