TOPICS: Data and Expressions
MUST BE IN JAVA. PLEASE USE COMMENTS AND WRITE THE CODE IN SIMPLEST FORM.
Write an application that prompts for and reads the numerator and denominator of a fraction as integers, then displays the decimal equivalent of the fraction.
Hint:This requires casting from integer to double before dividing.
Testing:Submit testing exhibits using the following inputs:0, 1 giving 0.0; 1, 2 giving 0.5; 3, 8 giving 0.375; 2, 3 giving 0.666...; 25, 7 giving 3.57128...
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here