Question: Write a program that prompts the user to enter a decimal number and displays the number in a fraction. Listing JEnter Enter a decimal number:
Write a program that prompts the user to enter a decimal number and displays the number in a fraction.

Listing

JEnter Enter a decimal number: 3.25 The fraction number is 13/4 JEnter Enter a decimal number: -0.45452 The fraction number is -11363/25000
Step by Step Solution
3.37 Rating (169 Votes )
There are 3 Steps involved in it
Program Plan 1 Create a class Rational 2 Declare and Initialize the private members numerator and de... View full answer
Get step-by-step solutions from verified subject matter experts
