Discussion on C, C++ and C++11 at the COJ. This is the place to clear your doubts about these languages, and to share with the community the new things you learn about them.
- Posts: 11
- Joined: 6 years ago
How can i calculate the log in base 2 of a number in C++?
- Posts: 1968
- Joined: 7 years ago
- Location: Universidad de las Ciencias Informáticas
With the function log2(num) ... from the math library.
"Every problem has a simple, fast and wrong solution" OJ's Main Law.