Question: This is for java progamming Write a program that prompts the user to enter the numerator and denominator of a fraction number and determines whether

This is for java progamming
Write a program that prompts the user to enter the numerator and denominator of a fraction number and determines whether it is a proper fraction and improper fraction. For an improper fraction number, display its mixed fraction in the form of a + b / c if b % c is not zero; otherwise, display only the integer.
Here are sample runs of the program:
Sample 1:
Enter a numerator: 16
Enter a denominator: 3
16 / 3 is an improper fraction and its mixed fraction is 5 + 1 / 3.
Sample 2:
Enter a numerator: 6
Enter a denominator: 7
6 / 7 is a proper fraction
Sample 3:
Enter a numerator: 6
Enter a denominator: 2
6 / 2 is an improper fraction and it can be reduced to 3
Write a program that prompts the user to enter the numerator and denominator of a fraction number and determines whether it is a proper fraction and improper fraction. For an improper fraction number, display its mixed fraction in the form of a + b / c if b % c is not zero; otherwise, display only the integer.
Here are sample runs of the program:
Sample 1:
Enter a numerator: 16
Enter a denominator: 3
16 / 3 is an improper fraction and its mixed fraction is 5 + 1 / 3.
Sample 2:
Enter a numerator: 6
Enter a denominator: 7
6 / 7 is a proper fraction
Sample 3:
Enter a numerator: 6
Enter a denominator: 2
6 / 2 is an improper fraction and it can be reduced to 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!