Question: Fix the program so that 160.24 is also converted to kilos. Write a function pounds2kilos that returns the metric (kilo) equivalent of a weight given
Fix the program so that 160.24 is also converted to kilos.
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"
Step by Step Solution
3.44 Rating (154 Votes )
There are 3 Steps involved in it
include float pounds2kilosfloat ... View full answer
Get step-by-step solutions from verified subject matter experts
