Write algorithm to decide which commute is cheaper

Assignment Help Data Structure & Algorithms
Reference no: EM1368684

Write a working algorithm in pseudo code to decide which commute is cheaper:

You want to decide whether you should drive your car to work or take the train. You know the one-way distance from your home to your place of work, and the fuel efficiency of your car(in miles per gallon). You also know the one-way price of a train ticket. You assume the cost of gas at $4 per gallon, and car maintenance at 5 cents per mile.

There are 4 basic steps to good algorithm design.
Step1: Determine the inputs and outputs
Step2: Break down the problem into smaller tasks
Step3: Describe each subtask in pseudo code
Step4: test your pseudo cose by working a problem

Reference no: EM1368684

Questions Cloud

Explain spacewise efficient implementation two-stack data : Structure of such two-stack data type would consist of two arrays and two top pointers. Describe why this may not be a spacewise efficient implementation.
Relationship between level of gdp and economic well being : Discuss and explain the relationship between the level of GDP and economic well-being. What factors of well-being are missing from the GDP?
Show the negotiation tools : What negotiation tools can you find from the post of this learner. How might you prepare differently for a negotiation with them ?
Determine optimal scams need for external funds : The Optimal Scam Corporation would like to see its sales grow at 20% for the foreseeable future. Its financial statements for the current year are presented below.
Write algorithm to decide which commute is cheaper : Write working algorithm in pseudo code to decide which commute is cheaper: You wish to decide whether you must drive your car to work or take train. You know one-way distance
Calculating the dividend yield : Springsten Music Corporation earned $820 million last year and paid out 20% of earnings in dividends. By how much did the company's retained earnings increase?
Determine net initial investment : A corporation bought a machine for $100,000 four years ago. It was being depreciated on a straight line basis over five years. The company decides to replace this machine today.
Needs and expectations of customers : Bargain furniture store management - Which evaluation tools would you utilize to ascertain the needs and expectations of your customers?
Write algorithm in pseudo code for bank account : Write an algorithm in pseudo code to settle following question: A bank account starts out with $10,000. Interest is compounded monthly at 6% per year(0.5% per month).

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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