Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Feet-inches input validation
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { Measurement m=new Measurement(); m.set(4,33); m.validate_method(); } } class Measurement{ int feet,inches; void set(int ft,int in) { feet=ft; inches=in; } void validate_method(){ while(inches>=12){feet=feet+1; inches =inches-12;} System.out.println(feet+"feet "+ inches+"inches");}}
run
|
edit
|
history
|
help
0
moneda
LCM of 2 numbers
dfkbzhfvjahfjh
Odd Numbers
K closest points
Lincoln1_Surafel
Area of the triangle
2B
Display Page (Pagination)
nth fibonacci ( memoization )