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

  What output would be produced by the program segment

What output would be produced by the following program segment?

  Mark the following statements as true or false

Mark the following statements as true or false.

  Complete the 8 queens 2 dimensional array

Complete the 8 queens 2 dimensional array program with backtracking. please change the below program using backtracking  and please run before posting it . the program suppose to print 92 solution . amd also comment before each line to better unde..

  Program to check compatibity for matrix multiplication

Write down program in C++ for matrix multiplication. Program must accept dimension of both matrices to be multiplied and check for compatibity.

  Need a program that has the user enter a string

Need a program that has the user enter a string. The program will test to see if its a exact palindrome like "civic" or "level". then it should test if its an inexact palindrome like "a nut for a jar of tuna".

  Write c++ program to create a bar chart showing the average

Write a c++ program to create a bar chart showing the average monthly mean temperature for College Station from 2004 to 2013.

  Write program to read from file to find number of integers

Write down the program which reads from file numbers.txt 30 integers in range 0 - 200. Program ‎then determines number of integers in each of given ranges.

  Calculate the total volume for all three boxes

Calculate the total volume for all three boxes in question.Add a third box to the calculation.

  Assignment 1write a program using vectors and iterators

assignment 1write a program using vectors and iterators that allows a user to maintain a personal list of dvd titles.

  Program that read in from the key board a string

Write a complete C++ program that read in from the key board a string and convert all letters in the string to upper cases. You are not allowed to use toupper function.

  Public data members and private data members.

Explain the difference between public data members and private data members. Give an example in the main function to show that one C++ statement is valid and the other is invalid (you can use Grade class in Problem 5.

  Application which will read a file of daily payments

C++ application which will read a file of daily payments, calculate the total as well as the average payment, display the results to the screen and write the results to a file. The input and output file names should be provided as command line argume..

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