i need to write a program that computes log base b I'm getting these errors
main.cpp:28:10: error: called object type 'double' is not a function or function pointer
log = log( base)/log( num);
~~~^
main.cpp:28:21: error: called object type 'double' is not a function or function pointer
log = log( base)/log( num);
/*
* File: main.cpp
* Author: Guest
*
* Created on February 12, 2016, 11:04 PM
*/
#include <cstdlib>
#include <iostream>
#include <cmath>
usingnamespace std;
/*
*
*/
int main() {
double base;
double num;
double log;
cout << "Please enter the base must be greater than 0 " << endl;
cin >> base;
cout << "Please enter a number must be greater than 0" << endl;
cin >> num;
log = log( base)/log( num);
cout << " The logarith base is " << log << endl;
return 0;
}
/*
* File: main.cpp
* Author: Guest
*
* Created on February 12, 2016, 11:04 PM
*/
#include <cstdlib>
#include <iostream>
#include <cmath>
usingnamespace std;
/*
*
*/
int main() {
double base;
double num;
double logAnswer;
cout << "Please enter the base must be greater than 0 " << endl;
cin >> base;
cout << "Please enter a number must be greater than 0" << endl;
cin >> num;
logAnswer = log( base)/log( num);
cout << " The logarith base is " << logAnswer << endl;
return 0;
}