Program that perform arithmetic operations on fractions

Assignment Help C/C++ Programming
Reference no: EM13937106

Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, where a and b are integers and b is not equal to 0. Your program must be menu driven, allowing the user to select the operation (+, -, *, /) and input the numerator and denominator of each fraction. 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 adds two fractions together (or you can overload the +operator()).

c. Function subtractFractions: This function subtracts one fraction from another (or you can overload the -operator()).

d. Function multiplyFractions: This function multiplies two fractions together (or you can overload the *operator()).

e. Function divideFractions: This function divides one fraction into another (or you can overload the /operator()).

Some sample outputs are:
3 / 4 + 2 / 5 = 23 / 20
2 / 3 * 3 / 5 = 6 / 15

Your answers need not be in the lowest terms.

Reference no: EM13937106

Questions Cloud

Report to the chairman : Write a report to the Chairman or Managing Director of a Company regarding review of its Governance Structure
Why did knut need to introduce the new performance measures : Why did Knut need to introduce these new performance measures? That is, why does he need to use these performance measures over and above the operating profit numbers for the period?
Program that uses the attached data file as input : Please do this the easiest way possible, I am learning C++ by myself but I just don't understand input/output so this will help me understand it better.
Create a class called collegecourse and explain it : Average()- a function template that will accept two arguments(HonorPoints of the same data type) and computes the average of two HonorPoints
Program that perform arithmetic operations on fractions : Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, where a and b are integers and b is not equal to 0. Your program must be menu driven, allowing the user to select the operation (+, -, *,..
Audience of health professional : Write an article for publication in a journal, Your article should inform a much broader audience of health professional than you could reach.You are required to write in a scholarly yet engaging style using harvard referencing.
Triple integrals in spherical coordinates : Using only the fact that the volume of a sphere, of radius r, is V = (4 π r ³) / 3 and your knowledge of triple integrals in spherical coordinates, find the volume contained within the sphere x² + y² + z² = a² but not within the sphere x² + y² + (..
Why do leaves of deciduous trees and shrubs in temperate : Why do leaves of deciduous trees and shrubs in temperate regions change color in the fall? What is involved in this process? What factors may further influence this change, such as street lights, additional CO2, and temperature change?
Mplement the function pop() which deletes the element : Assume that a doubly linked list "header" stores the elements of a priority queue. Implement the function pop(), which deletes the element with the largest value from the list (priority queue).

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd