Write a program that will help you make a decision

Assignment Help Programming Languages
Reference no: EM131307720

Assignment

A student had to make a decision on how to be paid. The student could accept a straight $10/hour or take 10 cents for the first hour, but have the hourly wage double each hour. That is, the student would make $.10 for the first hour, .20 for the second hour, .40 for the third hour etc.

The doubling effect makes the wage grow pretty fast, so if you were planning on working for very many hours, the second option is the best.

However if you are only working a few hours the $10/hour adds up fastest.

Write a program that will help you make a decision. Your program should have three options:

1) calculate the $10/hr earnings for a user specified number of hours, 2) calculate the earnings for a given number of hours if you chose the $.10 /hour that doubles each hour or 3) Exit.

Assume that for either method you only get paid for whole hours worked.

In other words, don't calculate wages for 10.5 hours, only whole hours count.

Your program should continue to run until the user enters an option 3.

Create a menu of choices as shown below, and take input from the keyboard where required.

A sample output is shown below:

Menu

1) Calculate earnings at $10.00/hr
2) Calculate earnings at $.10 doubled each hour
3) Exit

How many hours? 10
You will earn $100.00
How many hours? 10
You will earn $102.30

NOTE: Here are the answers in total earnings:
hour: method 1 method2
1 $10 $.10
2 $20 $.30 (.10 for 1st hr + .20 for 2nd hr)
3 $30 $.70 (.10 for 1st hr + .20 for 2nd hr + .40 for 3rd hr)
4 $40 $1.50 (+.80 for 4th hr)
5 $50 $3.10 (+1.60 for 5th hr)
6 $60 $6.30 (+3.20 for 6th hr)
etc...

2) Write a program that will determine the number of hours required before the second method becomes more beneficial than the straight $10/hr (first method). There will be no input to this question

Reference no: EM131307720

Questions Cloud

Explain the differences in observed behavior : State a hypothesis that offers a possible explanation for the observed behavior.- Simply identify a variable that could possibly explain the differences in observed behavior.
Find the ratio of ion pairs to molecules : If these ion pairs recombine into a distribution of 2000 new compounds, how many parts per billion is each?
Explain the variety of leadership theories and roles : Explain the variety of motivational theories and job design considerations.Explain the variety of leadership theories and roles.Evaluate ways organizational culture can be managed and promote ethics in an organization.
Whether the theory is supported by science : Choose a theory presented in a self-help book.- Investigate whether the theory is supported by science or is an example of pseudoscience.
Write a program that will help you make a decision : Write a program that will help you make a decision. Calculate $10/hr earnings for a user specified number of hours, calculate the earnings for a given number of hours if you chose the $.10 /hour that doubles each hour or Exit.
Ddefine literature search and subject words : Ddefine literature search, subject words, database, abstract, PsycINFO, PsycArticles, title, introduction, method  section and results section.
Calculate the dose in sv to the chest of a patient : The x-ray beam intensity is 1.50 W/m2, the area of the chest exposed is 0.0750 m2, 35.0% of the x-rays are absorbed in 20.0 kg of tissue, and the exposure time is 0.250 s.
Forecast future financial performance : Prepare your forecasts and write up the reasons for your forecast assumptions - Prepare your valuations and write up just the $ answers to your 4 models, as well as include share price on the date of your valuation
Identify one or two variables that might influence behavior : List five behaviors that you could observe in your day-to-day life. For each one, identify one or two variables that might influence the behavior.

Reviews

Write a Review

Programming Languages Questions & Answers

  Assignment - file access and pseudocode

Assignment - File Access and Pseudocode, When a program needs to save data for later use, it writes the data in a file. The data can be read from the file at a later time

  A squab is meant to represent a creature in a computer game

A Squab is meant to represent a creature in a computer game that is played on a rectangular grid. Positions on the grid are specified by two coordinates (x and y). Directions are represented by four letters: N, S, E and W. Movement in direction E cau..

  C++ program to design a class

The class should have a constructor that accepts a nonnegative integer and uses it to initialize the Numbers object. It should have a member function print() that prints the English description of the Numbers object. Demonstrate the class by writi..

  Use of various bash commands

Assignment On: This work will require scripting the use of various bash commands and / or small programs that involve directory and file structures.

  Which selection technique do you think is best suited

Which selection technique do you think is best suited for such a program? Why? Do you agree that all control structures are nothing but a form of the ''Go to'' statement? Why or why not? Justify your responses with reasons

  Write calendar application which allows user to select date

The purpose of this lab is to give you a chance to use some of the data stream tools we have been discussing in a simple application. The assignment is to write a calendar application which allows the user to select a date, and either retrieve a p..

  Write program that prompts user to specify people and car

Write a C++ program that prompts the user to specify people and cars. Store them in a vector and a vector .

  Prepare a shift cipher

In cryptography, a Caesar cipher, also called a shift cipher, encrypts a plaintext string by shifting the letters by a fixed number of positions shift_by.

  Create a subcircuit for the major parts

Design the simplest CPU that can do something slightly interesting. It will execute a small set of 16-bit instructions -  create a subcircuit for the major parts such as the register file, control, and ALU.

  What needs to be done to the matrix

How will the matrix above result if we execute the command - What needs to be done to the matrix above for enforcing this policy?

  Design a website by using php and mysql to order pizza

Your task for this project is to design a website by using PHP and Mysqlto order pizza - A website with a complete catalog of pizzas with possible add-on options and customers should be able to prepare and customize an order as per their preference..

  What are criteria for selection of a programming language

What are the criteria for selection of a programming language for developing Internet of things OR How to determine which programming language is suitable for developing Internet of things (IOT)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd