Please Help me for this, I'm confused 😵 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Please Help me for this, I'm confused 😵

Write an application that let the User input a length expressed in centimeters . The program should convert the length to inches, to the nearest inch, and then output the length expressed in yard, feet and inches, in this oder input: 313 output: 3 yard 1 feet 3 inches not: 2 yards 4 feet 3 inches or 10 feet

3rd Jul 2017, 9:04 AM
Arnel Campos Biscarra
Arnel Campos Biscarra - avatar
2 Answers
+ 2
you need to work out all the conversions first. like 1inch = 2.5cm so you would create a variable called inch inch = input * 2.5 then however many inches in a foot. so use modulo to figure out how many feet and then the remainder is left as inches etc
3rd Jul 2017, 9:18 AM
Daemo
Daemo - avatar
+ 1
Thank you so Much for the Help . I got it now 😍 sorry just a Beginner 😥
3rd Jul 2017, 2:34 PM
Arnel Campos Biscarra
Arnel Campos Biscarra - avatar