subject

You are tasked with creating a mileage calculator to calculate the amount of money that should be paid to employees. the mileage is computed as follows an amount of .25 for each mile up to 100 miles an amount of .15 for every mile above 100. so 115 miles would be (.25 * 100) + (.15 * 15) this can all be coded using a mathematical solution but i want you to use an if / else statement. here is how you are to implement it: if the total miles input is less than or equal to 100 then simply calculate the miles * .25 and output the amount otherwise compute the total amount for all miles mathematically. input: total number of miles process: dollar amount owed for miles driven output: amount of money due * note that you should simply do calculations within the if and else statements. this mean no cin or cout within if or else. do it afterward.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:00
Consider how gaming consoles initially relied on joysticks and joypads and then made the switch to modern gaming controls, which include analog sticks, buttons and switches, touch controls, accelerometers, motion controls, etc. name at least two kinds of gaming experiences that are possible with these new control devices but were not possible on original joysticks. explain how new technologies made this newer game style possible.
Answers: 1
question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 22.06.2019 19:50
Write a car class having two private member variables called tank and speed. write public methods called pumpgas and gofast. the method pumpgas gets an integer for gas that must be pumped. that value needs to be added to tank (no more than 20 gallons). it must return the amount of gas that is purchased ($4 per gallon). the method gofast should increase the speed by 5 each time it is called.write a constructor for the above class that initialized both variables to zero.write a tostring to display both the tank and speed when the car is printed.modify the car class to implement the interface comparable and an interface called carinter having the public methods in carinter.write the main program to create an array of size 5 of type car. create 5 car objects having each location of the array to refer to one of the cars. test the pumpgas, gofast, equals method on the array items. write an enhanced loop to print all the car values (using a tostring written last time).write a generic method to find the minimum of four items. pass int, double, char, string and car objects to test this method.
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
You know the right answer?
You are tasked with creating a mileage calculator to calculate the amount of money that should be pa...
Questions
question
Mathematics, 13.12.2019 01:31
question
English, 13.12.2019 01:31
question
Mathematics, 13.12.2019 01:31
question
Geography, 13.12.2019 01:31
Questions on the website: 13722360