[Solved] SOLVED:Program A : GoKarting (karting.c):

$25

File Name: SOLVED:Program_A_:_GoKarting_(karting.c):.zip
File Size: 386.22 KB

SKU: [Solved] SOLVED:Program A : GoKarting (karting.c): Category: Tag:
5/5 - (1 vote)

You and your friends want to go gokarting! Given the price ? per hour? and the number of minutes? you are able to spend there, report the cost you will spend. Note: because gokart places all want to make money, they will all round up to the nearest whole number of hours to calculate your cost.Sample Run (User input in bold and italics):How much does this gokart location charge per hour?10.99How many minutes can you spend there?30Your total will be $10.99.Sample Run (User input in bold and italics):How much does this gokart location charge per hour?5.30How many minutes can you spend there?120Your total will be $10.60.

Program B: Powerup Purchases (powerups.c):Steve has just discovered that his favorite game has an option to purchase powerups using ingame credits. Steve is super excited about this, as this is way easier than spending all his time checking every hiding place in every level to find them. But before he rushes into clicking the purchase button and regretting his choice, he wants to make sure he spends his credits right.Steve has narrowed his choices to two different types of powerups (his two favorites). Hewants to buy as many of these as possible using the credits he currently has. But he realized that there may be many different ways of splitting the money between the two types of powerups he wants to purchase. So hes decided that his goal should be to maximize the total number of powerups he gets.Write a program that will ask Steve for the cost of his two favorite powerups (in positive whole numbers of credits) and how many credits he has currently, then tell him the greatest number of powerups he can purchase and the greatest number of credits he can have left over after doing so.Sample Run (User input in bold and italics):How much does the first powerup cost (in credits)?1 2How much does the second powerup cost (in credits)?7How many credits do you currently have?6 2You can purchase a maximum of 8 powerups, with 6 credits left over.Note: different inputs to this program may result in different behaviors. Make sure you test other cases to make sure your program behaves as expected in these other cases.

Program C: Widget Discounts (discounts.c):Nick recently opened a widget store. This store sells widgets, widgets, and more widgets (and nothing else), so he figured it would be quite simple. However, at the end of his first month, he totaled up his profits and realized they are negative. Oh no!Looking down his totals, he eventually figured out why: his discounts to some of his more loyal customers have been too high. You see, Nick loves all of his customers. But he especially loves the ones that buy the most. He considers 3 sizes of purchases:Less than 100 widgets SmallBetween 100 and 500 widgets MediumMore than 500 widgets LargeWhen someone buys a small number of widgets, they pay normal price. When someone buys a medium number of widgets, Nick is quite happy, and gives them a discount off of the normal price. When someone buys a large number of widgets, Nick falls in love with them, and givesthem an even bigger discount off of the normal price! But his problem is this: sometimes these amounts are lower than his original costs, so he loses money on the sale! For simplicity, we will assume that each widget costs Nick $0.40 each (so he should be selling each of them for a higher cost than this to his customers):#define WIDGET_COST 0.40To help Nick save his business, please write a program that will prompt him for the price he will sell each widget for, the percent he will discount medium purchases by, and the percent he will discount large purchases by (each as whole numbers of a percent), then will output amessage indicating which of these choices is causing him not to make a profit. The possibleissues Nick could have are (output only the first in this list that is true):1. Nick, your base price is too low!2. Nick, you are discounting medium purchases too much!3. Nick, you are discounting large purchases too much!If there are no issues with his prices, you should just output:All prices look good to me!After outputting the appropriate message from above, dont forget to wish Nick good luck with his new business:Good luck!Sample Run (User input in bold and italics):How much are you selling each widget for?1 . 0 0What percent are you discounting medium orders?1 0What percent are you discounting large orders?2 0All prices look good to me!Good luck!Sample Run (User input in bold and italics):How much are you selling each widget for?2 . 0 0What percent are you discounting medium orders?8 0What percent are you discounting large orders?9 0Nick, you are discounting medium purchases too much!Good luck!Deliverables:Please submit three separate .c files for your solutions to these problems via WebCourses bythe designated due date:Program A: ? karting.cProgram B: ? powerups.cProgram C: ? discounts.c

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED:Program A : GoKarting (karting.c):
$25