Question
$3.00 C++ program logarithm with base 2
- From Computer-Science: Programming-Methods
- Closed, but you can still post tutorials
- Due on Sep. 13, 2010
- Asked on Sep 10, 2010 at 3:41:54PM
Q:
Write a program that reads a positive number and then computes and prints the logarithm of the value to the base 2. For example, the logarithm of 8 to the bas 2 is 3. Since 2^3=8.
So far I had this:
#include <iostream>
Using namespace std;
#include <cmath>
Int main ()
{
Double log2(double x);
Float log2(float x);
Long double log2(long double x);
Getchar ();
Getchar ();
Return 0:
}
C++ program logarithm with base 2
- This tutorial hasn't been purchased yet.
- Posted on Sep 10, 2010 at 8:58:30PM
A:
Preview: ... #include #include #include
int main(int ...
The full tutorial is about 79 words long .
C++, simpe program for log2 calc, scanf(..), printf(..), ScreenShot, UseNotes
- This tutorial hasn't been purchased yet.
- Posted on Sep 10, 2010 at 10:01:54PM
Posted by :
A:
Preview: ... Using float log2(float)\n"); printf("The base 2 logarithm of %.4f is: %.4f\n", num,log2(num)); printf("\nUsing long double log2(long double)\n"); printf("No such thing as a 'long double'!\n ...
The full tutorial is about 125 words long plus attachments.

- This tutorial has appended information.
A+ Tested C++ Program with screenshot -- the logarithm to the base 2
- This tutorial hasn't been purchased yet.
- Posted on Sep 10, 2010 at 10:05:19PM
Posted by :
A:
Preview: ... the a ...
The full tutorial is about 4 words long plus attachments.
