Question: One yard equals 3 6 inches. The following program intends to read a floating - point value from input, convert the value from inches to
One yard equals inches. The following program intends to read a floatingpoint value from input, convert the value from inches to yards, and output the length in yards, but the code contains errors. Find and fix the errors.
Ex: If the input is then the output is:
yards
using namespace std;
int main
Modify the following code
int lengthInches;
int lengthYards;
cin lengthInches;
lengthYards lengthInches ;
cout fixed setprecision lengthYards yards" endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
