
Patrick B. answered 04/13/21
Math and computer tutor/teacher
using namespace std;
#include <iostream>
#include <math.h>
int main()
{
double x=-1;
while (x<=0)
{
cout << "Please input the decimal number of which to find the Log :>";
cin >> x;
}
cout << "Log (base 2) of " << x << " is " << log(x)/log(2) << endl;
}