// Justin C. Miller
// Date: 1-24-2001
// University of Wisconsin Oshkosh
// Made for: http://www.geocities.com/neonprimetime.geo/index.html
// Borland Builder 4.0
// Title: Examples of Math.h
// Description: Using...
// sqrt(x) // square root
// abs(x) // absolute value of integer
// fabs(x) // absolute value of float or double
// labs(x) // asbolute value of long
// cos(x) // cosine in radians
// sin(x) // sine in radians
// log10(x) // log base 10 of x
// ceil(x) // the ceiling of a number
// floor(x) // the floor of a number
#include
#include
int main()
{
int a = 49, b = -8 ;
double c = -9.222, PI = 3.141592 , f = 7.7, g = 3.2;
float d = -5.5 ;
long e = -9231211 ;
int y = 100 ;
cout << "The square root of 49 is " << sqrt(a) << endl ;
cout << "The absolute value of -8 is " << abs(b) << endl ;
cout << "The absolute value of -5.5 is " << fabs(d) << endl ;
cout << "The absolute value of -9.222 is " << fabs(c) << endl ;
cout << "The asbolute value of -9231211 is " << labs(e) << endl ;
cout << "The cosine of PI is " << cos(PI) << endl ;
cout << "The sine of PI/2 is " << sin(PI / 2) << endl ;
cout << "The ceiling of 7.7/ 3.2 is " << ceil(f/g) << endl ;
cout << "The floor of 7.7/3.2 is " << floor(f/g) << endl ;
cout << "log10(100) is " << log10(y) << " -- (in base 10) " << endl ;
return 0 ;
}
               (
geocities.com/neonprimetime.geo/cpp)                   (
geocities.com/neonprimetime.geo)