C++ Header and Source Files Calling a math function from math.h

Description

C++ Header and Source Files Calling a math function from math.h

#include <iostream> 
#include <math.h> 

using namespace std; 

int main() /*from   w  ww .jav  a  2s.  c  om*/
{ 
  cout << fabs(-10.5) << endl; 
  cout << fabs(10.5) << endl; 

  double mynumber;
  mynumber = fabs(-23.87);

  cout << mynumber << endl;
  return 0;
}



PreviousNext

Related