Fix the program so that 160.24 is also converted to kilos. Write a function pounds2kilos that returns
Fantastic news! We've Found the answer you've been seeking!
Question:
Fix the program so that 160.24 is also converted to kilos.
Transcribed Image Text:
Write a function pounds2kilos that returns the metric (kilo) equivalent of a weight given in pounds (all values should be floats). Use this function in a program that keeps asking the user for a weight in pounds and reports the equivalent value in kilos. If the user enters something other than a number, the program should exit. Note the scanf function will return the number of values successfully scanned from the line (which may be 0, if the line had no scannable values). The return value -1 is used to indicate "end of file" Write a function pounds2kilos that returns the metric (kilo) equivalent of a weight given in pounds (all values should be floats). Use this function in a program that keeps asking the user for a weight in pounds and reports the equivalent value in kilos. If the user enters something other than a number, the program should exit. Note the scanf function will return the number of values successfully scanned from the line (which may be 0, if the line had no scannable values). The return value -1 is used to indicate "end of file"
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
Repeat Exercise P3.21, modifying the program so that it prompts for the frequency instead. Data from Exercise P3.21, Write a program that prompts the user for a wavelength value and prints a...
-
Repeat Exercise P3.21, modifying the program so that it first asks the user whether the input will be a wavelength or a frequency. Data from Exercise P3.21, Write a program that prompts the user for...
-
Fix T £(R"; RW). Set a) Prove that M1 b) Using the linear property of T, prove that if x 0, then c) Prove that M1 = M2 = ||T||. My := sup [T(x)11 and M2 := inflC > 0 : llT(x)|| C4xll for all x...
-
12. For a piece of material, the steady state flow of material across its thickness is 0.250 x 10 kg/m-hr. If the concentrationon the high side of the material is 1.85 kg/m and is 0.06 kg/m on the...
-
Equipment acquired on January 3, 2007, at a cost of $265,500, has an estimated useful life of eight years and an estimated residual value of $31,500. a. What was the annual amount of depreciation for...
-
Let a transverse electromagnetic wave H = xH x exp i(ky t) propagate in a linear magnetic medium exposed to a static magnetic field B = B z z. If and are constants, experiment shows that the...
-
Review each of the following items, a through \(f\), and determine whether the item supports a (1) production view of quality or a (2) customer view of quality. a. Applying management-by-exception...
-
The following comparative income statement (in thousands of dollars) for two recent years was adapted from the annual report of Speedway Motorsports, Inc., owner and operator of several major motor...
-
Find and simplify the difference quotient f(x+ h) - f(x), hx 0 h f(x) = 4x for the given function.
-
Waylander Coatings Company purchased waterproofing equipment on January 6 for $1,031,600. The equipment was expected to have a useful life of four years, or 10,400 operating hours, and a residual...
-
Calculate the missing numbers in the following situations: (Input all amounts as positive values.) b. 91,800 $ 156,000 S 118,000 Purchases Purchase discounts 3,800 2,400 Purchase returns and...
-
A capacitor having capacitance \(10 \mathrm{pF}\) is connected to a \(9-\mathrm{V}\) battery. If you consider a cylindrical Gaussian surface around the capacitor, calculate the net electric flux...
-
Assume that \(y\) is normally distributed with mean \(\mu\) and variance \(\sigma^{2}\). Let \(\phi(\cdot)\) and \(\Phi(\cdot)\) be the standard normal density and distribution functions,...
-
Suppose that a one-way analysis of variance involves four treatments but that a different number of observations (e.g., $n_{i}$ ) has been taken under each treatment. Assuming that $n_{1}=3, n_{2}=2,...
-
When a potential difference of \(1.00 \mathrm{~V}\) is maintained between opposing faces of a metal that has a charge carrier number density of \(n=6.60 \times 10^{28}\) charge carriers \(/...
-
A bullet travels through air (300 K, 100 kPa) at twice the speed of sound. Determine the temperature and pressure at the nose of the bullet. Note that although there will be a curved, bow shock ahead...
-
A risk free, zero coupon bond has 15 years to maturity. What is closest to the price per $1000 of face value that the bond will trade at if the YTM is 6%?
-
d) For die casting processes: 1. What are the most common metals processed using die casting and discuss why other metals are not commonly die casted? 2. Which die casting machines usually have a...
-
Calculate the de Broglie wavelength of an electron moving at 1/137th the speed of light. (At this speed, the relativistic correction to the mass is negligible.)
-
Calculate the magnitude of the spin angular momentum of a proton. Give a numerical answer.
-
The stationary-state wave functions of a particle in a three-dimensional rectangular box are eigen functions of which of these operators? (a) px; (b) p2x; (c) p2z; (d) x. For each of these operators...
-
Indicate whether the following items, a through j, are (1) typical characteristics of open-book management or (2) not typical characteristics of open-book management. a. Considered a large size...
-
Match each of the blockchain terms, 1 through 7, with the most appropriate definition, choosing from items a through \(g\). Definitions a. b. C. - Allows for automation of external transactions...
-
Match the concept listed in items 1 through 8 with the most appropriate description listed in items a through h. Concept 1. Capital investment analysis 2. Type of environmental control 3. End-of-pipe...
Study smarter with the SolutionInn App