In this program you will ask the user for 4 integers that represent two fractions. First ask for the numerator of the first and then the denominator. Then ask for the numerator and denominator of the...


use Java


In this program you will ask the user for 4 integers that represent two<br>fractions.<br>First ask for the numerator of the first and then the denominator.<br>Then ask for the numerator and denominator of the second.<br>Your program should add the two fractions and print out<br>the result.<br>For example, a sample program run might look like this<br>What is the numerator of the first fraction? 1<br>What is the denominator of the first fraction? 2<br>What is the numerator of the second fraction? 2<br>What is the denominator of the second fraction? 5<br>The sum of 1/2 + 2/5 = 9/10<br>Note: you do not need to reduce these fractions.<br>Remember, if you have two fractions you add them with:<br>a<br>ad + bc<br>+<br>b<br>d.<br>bd<br>

Extracted text: In this program you will ask the user for 4 integers that represent two fractions. First ask for the numerator of the first and then the denominator. Then ask for the numerator and denominator of the second. Your program should add the two fractions and print out the result. For example, a sample program run might look like this What is the numerator of the first fraction? 1 What is the denominator of the first fraction? 2 What is the numerator of the second fraction? 2 What is the denominator of the second fraction? 5 The sum of 1/2 + 2/5 = 9/10 Note: you do not need to reduce these fractions. Remember, if you have two fractions you add them with: a ad + bc + b d. bd

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here