Shirlee is working with a measurement tool that reports measurements in centimet
ID: 3627288 • Letter: S
Question
Shirlee is working with a measurement tool that reports measurements in centimeters. Since Shirlee is unfamiliar with centimeters, she would like her centimeter measurements to be converted into yards, feet, and inches. She would also like the result to be properly rounded to the nearest inch. As an example, if the measurement is 312 centimeters, this should be converted to 3 yards, 1 foot, and 3 inches.1. Identify the inputs and outputs of the problem.
2. Identify the processing needed to convert the inputs to the outputs. HINT: Convert centimeters to total number of inches first! (1 inch = 2.54 cm)
3. Design an algorithm in pseudocode to solve the problem. Make sure to include steps to get each input and to report each output.
4. Identify two test cases other than the example given above. For each of the two test cases show what inputs you will use and calculate what your expected outputs should be.
5. Write the program to implement your algorithm. Test your program using your test cases. Did your program produce the values predicted in your test cases? Explain.
Explanation / Answer
DEAR FRIEND this the program u want and it is easy to under stand if u found any problems understanding just message me PLEASE RATE #include using namespace std; double cast(double &num) { if(num < 1) { num=num*10; if(num >=5) return 1; else { num=num/10; num=num*10; if(num>=5) return .5; } } else if(num > 1) num=static_cast(num); return num; } void main() { double cent,inch,feet,yard; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.