Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

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

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92062351
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Programming Language

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As