Solved by Expert Tutors
C++ Programming 1. Write a program that reads in three floating-point numbers and prints the largest of the three inputs. For example: 4 9 2.5 The...
Solved by Expert Tutors
Question

C++ Programming

1. Write a program that reads in three floating-point numbers and prints the largest of the three inputs. For example: Please enter three numbers: 4 9 2.5 The largest number is 9.

2. Write a program that translates a number between 0 and 4 into the closest letter grade. For example, the number 2.8 (which might have been the average of several grades) would be converted to B–. Break ties in favor of the better grade; for example 2.85 should be a B.

3. A local pet store has tasked you with writing a computer program that computes the gift card amount to give loyal shoppers based on the total dollars spent by the shopper. Write a program, that uses if-statements, that computes the gift card amount according to this schedule, given the shopper’s total amount spent:

No gift card for shoppers that spent less than 10.00 dollars

2.00 gift card for shoppers that spent 10.00 – 19.99 dollars

4.00 gift card for shoppers that spent 20.00 – 29.99 dollars

6.00 gift card for shoppers that spent 30.00 – 39.99 dollars

8.00 gift card for shoppers that spent 40.00 – 49.99 dollars

10.00 gift card for shoppers that spent 50.00 or higher dollars

The program should output a message that says “Thank you for your loyalty. Please accept this gift card in the amount of ” followed by the dollar amount. Example output for a shopper that spent 10.00:

Thank you for your loyalty. Please accept this gift card in the amount of 2.00

First, describe your algorithm using pseudocode.

Translate the pseudocode into a C++ program. You must comment your program including comments at the top of the file that explains what the program does and comments for every line of code that explains what is happening for the line of code. Apply troubleshooting and testing strategies to ensure your code compiles, runs, and provides accurate results.

Submit 2 files:

Your Word document with your pseudocode.

Your .cpp file

Sign up to view the entire interaction

Step-by-step answer

consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus e

ur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar

Assignment_.zip - Preview not available

Subscribe to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Let our 24/7 Computer Science tutors help you get unstuck! Ask your first question.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes