Question: 7. (20 points) Write a class named Log (to simulate logarithm) such that it works as in the main below. Google wiki logarithm if you
7. (20 points) Write a class named Log (to simulate logarithm) such that it works as in the main below. Google "wiki logarithm" if you forget what "log" means. int main() { Log a(4), b(8): a.print(); b.print(); // output: log(4) // output: log (8) Log c = a.add(b); c.print(): // output: log (32) // Hint: log(4) + log(8) = log ( 48) log(32) Log d = a.multiply(3); d.print(): // output: log(64) // Hint: log(4) + 3 = log(4-3) log(64) cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
