I am in CS 50 I must use C programming (printf scanf etc) The following attachment show
Fantastic news! We've Found the answer you've been seeking!
Question:
I am in CS 50 I must use C programming (printf scanf etc) The following attachment show the questions I need answered.
Transcribed Image Text:
Part 1 Ticket discount (if statements/elif) Tell the user that tickets cost 14 dollars. Then ask the user his age. If the user's age is <18 tell them that they can get a 10 dollar admission for being a minor, If the user's age is >= 65, tell them that they can get a 10 dollar admission for being a senior citizen, lastly let them know if they have to pay full price. Part 2 Do I have enough? User wants to buy your product ask him how much money he has, calculate the price of your product plus its 8% sales tax and then tell him if he can buy it or not and if he can then congratulate him on his purchase and let him know how much money he has left now Part 3 Did I fail? (if statements/elif) A) Do this with an if statement with else if's Ask the user to input his score (1-100). If he is 90-100 tell him no you got an A!, if he is 80-89 tell him no you got a B!, if he is 70- 79 tell him it's a C!, 60-69 it's a D, 0-59 tell him Yeah you did fail, I'm sorry. Have a default else case for if they enter a bogus grade like 199 B) Do this with a switch statement? HINT (use integer division) Part 1 Ticket discount (if statements/elif) Tell the user that tickets cost 14 dollars. Then ask the user his age. If the user's age is <18 tell them that they can get a 10 dollar admission for being a minor, If the user's age is >= 65, tell them that they can get a 10 dollar admission for being a senior citizen, lastly let them know if they have to pay full price. Part 2 Do I have enough? User wants to buy your product ask him how much money he has, calculate the price of your product plus its 8% sales tax and then tell him if he can buy it or not and if he can then congratulate him on his purchase and let him know how much money he has left now Part 3 Did I fail? (if statements/elif) A) Do this with an if statement with else if's Ask the user to input his score (1-100). If he is 90-100 tell him no you got an A!, if he is 80-89 tell him no you got a B!, if he is 70- 79 tell him it's a C!, 60-69 it's a D, 0-59 tell him Yeah you did fail, I'm sorry. Have a default else case for if they enter a bogus grade like 199 B) Do this with a switch statement? HINT (use integer division)
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these algorithms questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
9.3.1 Which of the following statements are true concerning the mean of the differences between two dependent samples (matched pairs)? Select all that apply. A. The requirement of a simple random...
-
A snow-making machine used for ski areas blows a mixture of compressed air and water through a nozzle. The temperature of the mixture may initially be well above the freezing temperature of water,...
-
President Franklin D. Roosevelt once said, "! am wholly unable to figure out the amount of tax," and w rote to the Federal Commissioner of Revenue, "may I ask that [the agency] let me know the amount...
-
Consider mass loss from a smooth wet flat plate due to forced convection at atmospheric pressure. The plate is \(0.4 \mathrm{~m}\) long and \(2 \mathrm{~m}\) wide. Dry air at \(300 \mathrm{~K}\) and...
-
The Tornado Vacuum Cleaner Company produces and sells three different types of upright vacuum cleaners: (1) the F1, (2) the F3, and (3) the F5. Each vacuum cleaner shares certain basic features such...
-
In multi-site manufacturing operations, what role does TPM play in standardizing maintenance practices and ensuring consistency across different plants or facilities? Discuss the challenges and...
-
The proposed rates were not in the range the CEO expected given the pricing analysis. The CEO has asked the pricing actuary to verify the total projected loss cost excluding potential large storm...
-
Q1) The three year bond yield curve is 2.0%, 2.5% and 3.2%. Compute the annual zero coupon bond prices (B), the spot rates (S) and the forward rates (F). Q2) Confirm that you have derived the zero...
-
Target's year end 12/31/2020 inventory records indicated a balance of $678,000. Additional information indicates that this amount also included the following inventory items: Purchases: (Target...
-
If the Ad agency is currently producing 12 proposals and 15 ads, what is the opportunity cost of producing 22 proposals? (number of ads)
-
Consider the function U (p,b) = 2ln (p) + In (b) (a) Find the unconstrained maximum of the function (b) Now, suppose that the maximization is subject to the constraint 2p+36=24. What is the...
-
A pendulum has a period of 1.50 s on Earth. What is its period on Mars, where the acceleration of gravity is about 0.29 that on Earth?
-
In JAVA please, please follow all instructions exactly 8. (8 points) Given the following class IntNode, complete method static boolean doubled(int i, IntNode 1s) to return true if the in teger, i,...
-
Choose an article and then write about the ethical implications and the impact of the events that are described. Read and reflect on one of the following articles. Google Code of Ethics on Military...
-
Using the theoretical sampling strategy, how many samples of size 4 (n = 4) can be drawn from a population of size: (a) N = 5? (b) N = 8? (c) N = 16? (d) N = 50?
-
Sherry rents her vacation home for 6 months and lives in it for 6 months during the year. Her gross rental income during the year is $4,000. Total real estate taxes for the home are $950, and...
-
Phil and Linda are 25-year-old newlyweds and file a joint tax return. Linda is covered by a retirement plan at work, but Phil is not. a. Assuming Phil's wages were $27,000 and Linda's wages were...
-
Quince Interests is a partnership with a tax year that ends September 30, 2012. During that year, Potter, a partner, received $3,000 per month as a guaranteed payment, and his share of partnership...
-
What is the change in velocity of \((a)\) cart 1 (b) cart 2 in Figure 4.6? (c) What do you notice about your two answers? Figure 4.6 Velocity-versus-time graph for two identical carts before and...
-
(a) Are the accelerations of the motions shown in Figure 4.1 constant? (b) For which surface is the acceleration largest in magnitude? Figure 4.1 Velocity-versus-time graph for a wooden block sliding...
-
The \(x\) component of the final velocity of the standard cart in Figure 4.8 is positive. Can you make it negative by adjusting this cart's initial speed while still keeping the half cart initially...
Study smarter with the SolutionInn App