Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are developing a Fraction structure for Teachers Pet Software. The structure contains three public data fields for whole number, numerator, and denominator. Using the

You are developing a Fraction structure for Teachers Pet Software. The structure contains

three public data fields for whole number, numerator, and denominator. Using the

same structure, write a main()function that declares an array of five Fraction objects.

Prompt the user for values for each field of each Fraction. Do not allow the user to enter

a value of 0 for the denominator of any Fraction; for each Fraction, continue to prompt

the user for a denominator value until a non-zero value is entered. After all the objects

have been entered:

Display the whole number, numerator, and denominator for each of the five Fraction

objects as entered.

Next, display the five Fraction objects all converted to proper formthat is, if the user

entered a value such as 2 6/4, now display it as 3 1/2.

Next, display the sum of all the Fractions and the arithmetic average of all the

Fractions.

Note :

For the Fraction.cpp output, output a space between the whole number and fraction of the complex number. Without the space, it makes the output look like the fraction was not reduced

Can the use of arrays , pointers and strings be used if so explain how its done

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions

Question

What is the orientation toward time?

Answered: 1 week ago

Question

4. How is culture a contested site?

Answered: 1 week ago