Question
write a program in the C/C++ programming language to input and add two fractions each represented as a numerator and denominator.Print your result (which is
write a program in the C/C++ programming language to input and add two fractions each represented as a numerator and denominator.Print your result (which is also represented as a numerator/denominator) to standard out. The following equation can be used to add fractions: a/b + c/d = (a*d + b*c)/(b*d) Example: 1/2 + 1/4 = ( 1(4) + 2(1) ) / 2(4) = 6/8 = 3/4 Re-design lab2 using a C++ class. Use examples from the study notes on data modeling (w/ classes). Convert your data model from a structure to a C++ class. Convert your data model operations from using functions to class member functions. Re-design your main program using objects from your class definition to perform the same functionality as in lab2. Use the example(s) from the notes to assist you in the re-design
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started