Question: in c++ Write a function log30 that takes a positive integer value n and returns lower bound log base_3 of it (Hint: Divide the number

in c++ Write a function log30 that takes a positive integer valuein c++

Write a function log30 that takes a positive integer value n and returns lower bound log base_3 of it (Hint: Divide the number by 3 until its division by 3 becomes 0 and count how many times you divided). Sample output1: Enter n : 9 log3(9)=2 Sample output2: Enter n:81 log3(81)=4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!