This question's due date has already passed. You may post a tutorial, but there's no guarantee that the original asker will purchase the tutorial. But other people might!

Question

$3.00 C++ program logarithm with base 2

Asked by :
karpinckis
karpinckis
Rating :No Rating
Questions Asked: 1
Tutorials Posted: 0
 
 
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:

}

 

 
 

Available Tutorials to this Question
 
$3.00
C++ program logarithm with base 2
  • This tutorial hasn't been purchased yet.
  • Posted on Sep 10, 2010 at 8:58:30PM
Posted by :
Albertom
Albertom
Rating (201):C+
Questions Asked: 0
Tutorials Posted: 1038,
Earned: $1,524.53
 
A:
Preview: ... #include #include #include int main(int ...

The full tutorial is about 79 words long .
 
$3.00
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 :
modulo51
 
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.

attachmentlogo

Attachments:
main.cpp (1K)
LogBase2ScreenShot.JPG (23K) (Preview)
LogBase2UseNotes.txt (0K) (Preview)
  • This tutorial has appended information.
 
$3.00
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 :
lightsource
lightsource Not confirmed
Rating (2371):A+
Questions Asked: 4
Tutorials Posted: 5492,
Earned: $112,172.17
 
A:
Preview: ... the a ...

The full tutorial is about 4 words long plus attachments.

attachmentlogo

Attachments:
screenshot_log2.JPG (14K) (Preview)
log2.cpp (0K)