Let's calculate the number of full feet in a certain number of inches. We'll create a special method (getFeetFromInches) to do this. Any remainder should be rounded. Thus, if we pass 243 inches to our method, then we will get only 20 feet, not 20.25.
More conversions
- 1
Locked
Comments (10)
- Popular
- New
- Old
You must be signed in to leave a comment
Steve C. Ands
19 November 2021, 22:20
The verification for this program is wrong.
Please fix it![]()

+1
Roman
24 November 2021, 07:43
Thanks, fixed.
0
Lunita
17 January, 19:56
I'm getting the same error. How to fix?
0
Lunita
17 January, 19:59
@Roman it's not fixed yet. My code is working correctly, but that last req won't pass.
0
Roman
19 January, 06:38
Send me your code in PM, please. I`ll check.
0
Lunita
2 February, 21:46
@Roman I already got pass the issue, thanks anyway.
0
Laura
7 August 2020, 21:13
How can I give the calculation for inches in feet into the program? 1 feet are 12 inches, have I write "int feet = int * 12" then?
0
Joe M
20 September 2020, 19:35
you must divide, not multiply
0
shivani maski
12 August 2019, 16:23
The verification for this program is wrong.
Please fix it
+3
Roman
13 August 2019, 06:21
Give me your correct code that did not pass the test. I'll check it.
+1