Answers for "fabs cpp"

C++
1

fabs() c++

#include <iostream>
#include <cmath>       /* fabs */
using namespace std;
int main ()
{
  cout<<"The absolute value of 3.1416 is "<< fabs (3.1416) <<endl;
 cout<< "The absolute value of -10.6 is "<< fabs (-10.6) <<endl;
 /*
 	The absolute value of 3.1416 is 3.1416
	The absolute value of -10.6 is 10.6
*/
  return 0;
}
Posted by: Guest on April-24-2022

Browse Popular Code Answers by Language