Write a program that converts english units to metric

Assignment Help Programming Languages
Reference no: EM13784558

Conversion between Metric and Nonmetric Units

English Metric

1 Ounce (oz) 28.3495 grams (g)

1 pound (lb) 453.6 grams (g)

1 inch(in) 2.54 centimeter (cm)

1 foot (ft) 30.5 centimeter (cm)

1 mile (mi) 1.609 kilometer (km)

Write a unit conversion program that converts English units to Metric using the conversion table given above. Ask the user from which unit they want to convert ( oz, lb, in, ft, mi) and which unit they want to convert to (g, kg, cm, and km). Reject incompatible conversions such as gal - > km, ask for the value to be converted; then display the result. Here is an example:

Convert from? gal

Convert to? ml

Value? 2.5

2.5 gal = 9462.5 ml

Reference no: EM13784558

Questions Cloud

Impact of credibility-physical attractiveness : What - Discuss the Characteristics of the Message: What attributes are inherent in persuasive messages? How are we influenced by the emotion, framing, narratives, and rational appeals in the messaging we receive? What is the significance of the sl..
What is the role of the ceo in stakeholder analysis : What is the role of the CEO in Stakeholder Analysis? What types of questions should a CEO ask regarding stakeholder relationships
Challenge as a learning opportunity : How will you reframe your thinking to view the challenge as a learning opportunity? (Describe what resources...)
Issue of common and civil law systems internationally : The issue of common and civil law systems internationally, Intellectual property, copyright infringements, and legal ramifications
Write a program that converts english units to metric : Write a unit conversion program that converts English units to Metric using the conversion table given above. Ask the user from which unit they want to convert ( oz, lb, in, ft, mi) and which unit they want to convert to (g, kg, cm, and km).
Cash flows associated with holding a job : It may surprise you that there are cash flows associated with holding a job. Construct a simple cash flow statement and payback calculation for when your job expenses will be covered for employment you currently have or have had in the past. Inclu..
How specifically did the story prompt or provoke us to feel : How specifically did the story prompt or provoke us to feel? These questions will guide us as we produce our reading journal entries.
How to appropriately answer a business call : The HRD department recently received a request from middle management requesting training on the above subject.
Analysis on projected return on investment : Develop a three- to four-page analysis (excluding the title and reference pages) on the projected return on investment for your college education and projected future employment. This analysis will consist of two parts:

Reviews

Write a Review

Programming Languages Questions & Answers

  Imagine you are a marketing consultant brought in to help a

imagine you are a marketing consultant brought in to help a company who has a product that is so successful they cannot

  Binary search algorithm to search an array

The binary search algorithm that follows may be used to search array when elements are in order. This algorithm is analogous to following approach for finding name in telephone book.

  Write a program to automate the scoring of dives

The state diving commission wants to computerize the scoring at its diving competitions.

  Prepare a assignment in sql

Prepare a assignment in SQL. To create two table names (not in use employee ,product ,order )- Separate queries of all function,screen shots and queries.

  Write a computer program that prompts user for two numbers

Write a computer program that prompts the user for two numbers, n for the number of items in the array to sort, and num_ifor a number of iterations

  Explain drawbacks to using ajax technology

What are some of the other drawbacks to using AJAX technology? Why are some of these very significant items to consider before implementing AJAX on a given website?

  What are the disadvantages of using technology

Describe your reasons for choosing this virtualisation technology, what advantages does this virtualisation and technology give you in this scenario - What are the disadvantages of using this technology?

  Display information about users that are currently logged in

Create a new file titled TestWork.scr Change the permissions on this new file to add the execute bit for user, group, and owner. Edit your new file using Gedit or VI and change it so it performs the following actions:

  Write a program that calculates how much an employee earn

Write a program that calculates how much an employee would earn over a period of time (in months), if, every month, the employee' pay-per-hour rate is one dollar

  Program to checks to see if the value of a is valid

Checks to see if the value of a is 0; if it is, the code prints the message "no solution for a=0" and returns from the function.

  Compare three generations of programming languages

Compare and contrast at least three generations of programming languages. Be sure to include in your discussion: semantics, syntax, and machine dependence.

  Write application to create-print random phone number

Write the application which creates and prints random phone number of form xxx-xxx-xxxx. Include dashes in the output. Do not let first three digits to contain 8 or 9.

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