ahmed0saber

Base-e log of a number in C++

Nov 4th, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. int main()
  5. {
  6.     float a;
  7.     cout << "Enter a number" << endl;
  8.     cin >> a;
  9.     cout << endl << "The base-e log of the number = " << log(a);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment