How to write a program in c++ to define a class fraction, which consists of numerator and denominator. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to write a program in c++ to define a class fraction, which consists of numerator and denominator.

Define functions to read , print , multiply and divide 2 fractions

5th Oct 2017, 5:50 PM
Muskan Bhuwal
Muskan Bhuwal - avatar
1 Answer
0
I don't see the problem, numerator and denominator can be instance variables and the functions will be methods, try to do something on your own and when you come to a stop we'll help you to go further :)
5th Oct 2017, 5:55 PM
‎ɐısıօլɐ
‎ɐısıօլɐ - avatar