Concept explainers
Check Writer
Write a
Date: 11/24/2018
Pay to the Order of: John Phillips $1920.85
One thousand nine hundred twenty and 85 cents
Be sure to format the numeric value of the check in fixed-point notation with two decimal places of precision. Be sure the decimal place always displays, even when the number is zero or has no fractional part. Use either C-strings or string class objects in this program.
Input Validation: Do not accept negative dollar amounts, or amounts over $10,000.
Want to see the full answer?
Check out a sample textbook solutionChapter 10 Solutions
Starting Out with C++ from Control Structures to Objects (8th Edition)
Additional Engineering Textbook Solutions
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Artificial Intelligence: A Modern Approach
Modern Database Management (12th Edition)
Starting Out with C++: Early Objects (9th Edition)
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
- Retail price calculator Write a program that asks the user to enter an item’s wholesale cost and its markup percentage. It should then display the item’s retail price. For example: • If an item’s wholesale cost is 5.00 and its markup percentage is 100 percent, then the item’s retail price is 10.00.• If an item’s wholesale cost is 5.00 and its markup percentage is 50 percent, then the item’s retail price is 7.50. The program should have a method named calculateRetail that receives the wholesale cost and the markup percentage as arguments and returns the retail price of the item.arrow_forwardGPA Calculator Students are concerned about their GPA. They need to calculate it accurately every semester to monitor their progress. Develop a GPA calculator that follows the AOU regulations (AOU-OU Grade Scale) using C# programming language. The application asks the student to enter his numeric grade of each course and the course's credit hours. Accordingly, the application calculates the student's GPA after converting the numeric grade to letter grade. The GPA calculation should produce floating-point results. Display the results rounded to the nearest hundredth. You should store the letter grades of all student's courses in an array. The final grade of the student should be also calculated. Sample I/O Enter the course grade (-1 to end): 93 Enter the course credit hours: 3 Enter the course grade (-1 to end): 74 Enter the course credit hours: 2 Enter the course grade (-1 to end): 60 Enter the course credit hours: 3 Enter the course grade (-1 to end): -1 The grades of your courses…arrow_forwardTime CalculatorWrite a program that asks the user to enter a number of seconds.-There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes and leftover seconds in that many seconds.-There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or equal to 3,600, the program should display the number of hours, minutes, and leftover seconds in that many seconds.-There are 86,400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86,400, the program should display the number of days, hours, minutes, and leftover seconds in that many seconds.arrow_forward
- Financial Assistance Application Create the Financial Assistance Application. A non-governmental organization needs your application to calculate the amount of financial assistance for needy families. The formula is as follows: • If the annual household income is between $30,000 and $40,000 and the house- hold has at least three children, the amount is $1,000 per child. • If the annual household income is between $20,000 and $30,000 and the house- hold has at least two children, the amount is $1,500 per child. • If the annual household income is less than $20,000, the amount is $2,000 per child. Implement a function for this computation. The program asks for the household income and number of children for each applicant, printing the amount returned by your function. Use -1 as a sentinel value for the input. The program output should be formatted as shown in the Sample Run. Note: You must use at least one function in your code.arrow_forwardC# Account numbers sometimes contain a check digit that is the result of a mathematical calculation. The inclusion of the digit in an account number helps ascertain whether the number is a valid one. Write an application named CheckDigit that asks a user to enter a four-digit account number and determines whether it is a valid number. The number is valid if the fourth digit is the remainder when the number represented by the first three digits of the four-digit number is divided by 7. For example, 7770 is valid, because 0 is the remainder when 777 is divided by 7. If the account number is valid, output The account number is valid. If the account number is invalid output Invalid. If the account number is too short or too long output Account number invalid - it must have 4 digits.arrow_forwardJavaarrow_forward
- # Global constant for body mass which is equal to 703 # Create variables and initialize all of them to 0.0 # create variable weight # create variable height # create variable BMI # input the weight from the user. # input the height from the user. # Calculate the body mass: # BMI is equal to weight * body mass divided by (height * height) # Display BMI. # Determine and display weight category if is greater then 25 you are overweight. # if is less then 18.5 is underweight otherwise is good # display all variablesarrow_forward7. SOFTWARE SALES A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity 10-19 20-49 50-99 100 or more Discount 20 % 30 % 40 % 50% Create an application that lets the user enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount.arrow_forwardDesign an application that accepts 10 numbers and displays them in descending order.arrow_forward
- Web page bill calculator. User inputs the "item name" and "item amount" on the webpage. The webpage will return the total money he need to pay. If the payment is more than 30 dollars, the user can have a 10% off discount. Bill = (item cost )* (# of items) Item cost apple orange peach $1.2 $2arrow_forwardlanguage JAVAarrow_forwardSavings Account The following steps calculate the balance at the end of three years when $100 isdeposited at the beginning of each year in savings account at 5% interest compounded annually.a) Create the variable balance and assign it the value 100.b) Increase the value of variable balance by 5%, and add 100 to it.c) Increase the value of variable balance by 5%, and add 100 to it.d) Increase the value of variable balance by 5%.d) Display the value of the variable balance (rounded to two decimal places).arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr