Write a program that reads two times in military format

Assignment Help Programming Languages
Reference no: EM131395971

Assignment

Using the Design Recipe, write an algorithm for each of the following programming problems:

The straight-line method for computing the yearly depreciation in value D for an item is given by the following formula:

depreciation_formula D = (P - S) / Y

where P is the purchase price, S is the salvage value, and Y is the number of years the item is used. Write a program that takes as input the purchase price of an item, the expected number of years of service, and the expected salvage value. The program should then output the yearly depreciation for the item.

A government research lab has concluded that an artificial sweetener commonly used in diet soda pop causes death in laboratory mice. A friend of yours is desperate to lose weight but cannot give up soda pop. Your friend wants to know how much diet soda pop it is possible to drink without dying as a result. Write a program to supply the answer. The input to the program is the amount of artificial sweetener needed to kill a mouse, the weight of the mouse, and the desired weight of the dieter. Assume that diet soda contains 1/10th of 1% artificial sweetener. Use a named constant for this fraction.

Write a program that inputs the name, quantity, and price of three items. Output a bill with a tax rate of 6.25%.

Write a program that helps a person decide whether to buy a hybrid car. Your program's inputs should be:

The cost of a new car
The estimated miles driven per year
The estimated gas price
The efficiency in miles per gallon
The estimated resale value after 5 years

Compute the total cost of owning the car for five years. (For simplicity, we will not take the cost of financing into account.) Obtain realistic prices for a new and used hybrid and a comparable car from the Web, and use today's gas price and 15,000 miles driven per year.

Write a program that reads two times in military format (e.g., 0900, 1730) and prints the number of hours and minutes between the two times. Note that the first time can come before or after the second time.

An online bank wants you to create a program that shows prospective customers how their deposits will grow. Your program should read the initial balance and the annual interest rate. Interest is compounded monthly. Print out the balances after the first three months.

A video club wants to reward its best members with a discount based on the member's number of movie rentals and the number of new members referred by the member. The discount is in percent and is equal to the sum of the rentals and the referrals, but it cannot exceed 75 percent.

Reference no: EM131395971

Questions Cloud

Point elasticity of demand at the price : Suppose you own a movie theater and most of your costs (the film rental, security, the land rental, etc.) are independent of how many people show up. What is likely to be the point elasticity of demand at the price you decide to charge?
Discuss the development of bilbo baggins character : Discuss the development of Bilbo Baggins' character. What qualities are used to describe him at the beginning of the story? What qualities emerge during the course of the story? What causes the changes in his character?
Higher unemployment for some of the workers : An increase in minimum wage must lead to higher unemployment for some of the workers and lower OJT for all workers." Evaluate.
Represents consumer income : A demand curve and supply curve for lawnmowers are given respectively as follows: QD = 72 ? 2P + 2MQS = 2P. Where M represents consumer income. Suppose that last year, consumer income was M = $150.
Write a program that reads two times in military format : Write a program that reads two times in military format (e.g., 0900, 1730) and prints the number of hours and minutes between the two times. Note that the first time can come before or after the second time.
Write a brief description of this problem : Identify a problem in your community or workplace that you'd like to solve - Write a brief description of this problem and an idea for your solution.
What can you conclude about the three groups : Farmer Marc, a Shakespearean devotee, delivered a plea at the County Faire, asking three different groups to lend him unshelled corn.- The numbers of bushels offered by the farmers are listed. What can you conclude about the three groups?
Explain the economic opportunity act : Explain The Economic Opportunity Act of 1964 and the programs created under it are classified as institutional programs. Increasing opportunities for the poor was the main concern of this act which proves that the basis of this act fits the model ..
Create a text document containing user names and passwords : Additionally, create a simple text document containing the user names and passwords. Tie this into the authentication on the login page.

Reviews

Write a Review

Programming Languages Questions & Answers

  Create an application that calculates the average salary

Create an application that calculates the average and highest salary of Major League Baseball players in 2011 and 2012.

  Calculating hit ratio for program having loops

Calculate hit ratio for program that loops 10 times from locations 0 - 64.

  Briefly explain these main programming paradigm

COMP348 PRINCIPLES OF PROGRAMMING LANGUAGES ASSIGNMENT. Briefly explain these main programming paradigm (Logic, Functional, Object Oriented, Procedural, Imperative and Aspect-oriented), and for each of these paradigms name at least one language tha..

  Implement a function for computing the achromatic phong

In this question you need to implement a function for computing the achromatic Phong illumination at a surface point.

  Program to determine how many values were inputted

Write down the program which reads data into the type int. Valid values are from 0 to 10. Your program must determine how many values were inputted.

  create a web page that uses a JavaScript program

Each line, after the first line, must only be output when the user clicks "Ok" in response to the alert.

  Write pseudocode for procedure construct-optimal-bst

Write pseudocode for procedure Construct-Optimal-BST (root) which, table root, outputs structure of the optimal bimary search tree.

  Determine the purpose of using javascriptr on a website

write a 200- to 300-word short-answer response to the followingwhat is the purpose of using javascriptr on a website?

  Describe two different ways to represent a birthday register

Describe two different ways to represent a birthday register, i.e. the names of your friends and their birth dates. Assume that none of your friends have the same name.

  Write a program that displays a virtual object on real video

In this assignment, you will write a program that displays a virtual (i.e., graphics) object (e.g., a wire-frame cube, a teapot) on a real video sequence.

  Implement floyd warshall algorithm in c language

Implement floyd warshall algorithm in c language.add comments for explanation

  Write a program that simulates battle between a cat and mice

I have written the program for the below assignment, but I am not getting the correct output. Below is the assignment and the program I have written along with the output I get.

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