Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello Sorry but I'm stuck in this lab. LAB - Dollar Bills Distributed: week3, Lab Session A Due: week3, Friday 11:59pm (late date is Sunday)

Hello Sorry but I'm stuck in this lab.

LAB - Dollar Bills Distributed: week3, Lab Session A Due: week3, Friday 11:59pm (late date is Sunday)

PROGRAM DESCRIPTION

User will input a whole number between 1 and 10, and the program will output that number as a dollar value. For example, if the user enters the number 4, the program will output the associated real value as currency: $ 4.00.

Your program should prompt the user to enter in a number between 1 and 10. Your program then prints out the associated value as dollars and zero cents, in the format above.

For this lab, it is not necessary that you check to see if the number the user entered in is between 1 and 10.

You will need to include the following lines of code to format your output: cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

EXAMPLE RUN (no indentation or tab): Please enter the number of dollar bills in your wallet: 4 You have $ 4.00

NOTES:

The text of your program needs to appear exactly as that above (minus the color)

The first line is called the user prompt, and ends with a colon

The number in yellow is the INPUT, and is what the user enters (between 1-10)

The second line is the OUTPUT, with the formatted output created by your program, preceeded by a label (exactly as above)

THE ONLY VARIABILITY IS THE VALUE ENTERED (yellow), AND ITS ASSOCIATED OUTPUT (green)

Tip: Your output will need to include a carriage return after each output line, with a blank line both preceeding and succeeding your output. You can accomplish this with " " or endl.

DELIVERABLES SUMMARY (10pts)

Your lab3.cpp submission at https://turnin.ecst.csuchico.edu which compiles successfully and passes the comparison tests to expected output. Your source file must include a complete general header & inline comments.

A companion submission to Blackboard:

o your lab3.cpp file

o screenshot which reflects turnin success & jaguar command-line compilation and practice runs (see posted example)

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

Students also viewed these Databases questions