Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, in which a and b are

Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b,

Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, in which a and b are integers and b != 0. Your program must be menu driven, allowing the user to select the operation (+, -, *, or /) and input the numerator and denominator of each fraction. Furthermore, your program must consist of at least the following functions: a. Function menu: This function informs the user about the program's purpose, explains how to enter data, and allows the user to select the operation. b. Function addFractions: This function takes as input four integers representing the numerators and denominators of two fractions, adds the fractions, and returns the numerator and denominator of the result. (Notice that this function has a total of six parameters.) c. Function subtractFractions: This function takes as input four integers representing the numerators and denominators of two fractions, subtracts the fractions, and returns the numerator and denominator of the result. (Notice that this function has a total of six parameters.) d. Function multiplyFractions: This function takes as input four integers representing the numerators and denominators of two fractions, multiplies the fractions, and returns the numerators and denominators of the result. (Notice that this function has a total of six parameters.) e. Function divideFractions: This function takes as input four integers representing the numerators and denominators of two fractions, divides the fractions, and returns the numerator and denominator of the result. (Notice that this function has a total of six parameters.) Your answer need not be in the lowest terms. Your program must validate all users' inputs:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres a C program that fulfills the requirements you provided It includes a menu function and functions for addition subtraction multiplication and di... blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems analysis and design

Authors: kenneth e. kendall, julie e. kendall

8th Edition

135094909, 013608916X, 9780135094907, 978-0136089162

More Books

Students explore these related Programming questions

Question

List the two types of team leaders.

Answered: 3 weeks ago