Write a program named FrationMath that promts the user for twofractions, which a
ID: 3608736 • Letter: W
Question
Write a program named FrationMath that promts the user for twofractions, which are then combined using addition, substration,multiplication, and division. Here's what the user will see on thescreen:This program performs arithmetic operations on twofrations.
Enter first fraction: 3/5 Enter second fraction: 1/6
Sum: 23/30 Difference: 13/30 Product: 3/30 Quotient: 18/5
You can assume that user always enter two separated by a slash( / ). However, the user may enter any number of spaces before andafter each integer. (use the IndexOf, substarcting, and trimmethods from the String class).
This program performs arithmetic operations on twofrations.
Enter first fraction: 3/5 Enter second fraction: 1/6
Sum: 23/30 Difference: 13/30 Product: 3/30 Quotient: 18/5
You can assume that user always enter two separated by a slash( / ). However, the user may enter any number of spaces before andafter each integer. (use the IndexOf, substarcting, and trimmethods from the String class).
Explanation / Answer
x.x
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.