// sineDemo.cpp
// Demonstrates sine function, a library function.

#include <iostream>
#include <cmath>      // cmath is a header file containing
                      // prototypes of math functions.
                      // In older versions of the C++ library,
                      // and in C, cmath is known as math.h.

using namespace std;

int main()
{
   // Announce purpose of program:
   cout << "This program computes the sine of an angle"
                  << " in radians." << endl;

   // Input angle in radians:
   float angle;
   cout << "Enter angle (radians):>";
   cin >> angle;

   // Compute sine of angle:
   float sine = sin(angle);    // using sin function declared in cmath
                               // and defined in an object file in
                               // the C++ library.

   // Display the result:
   cout << "sin(" << angle << ") is " << sine << "." << endl;

   return 0;
}  // function main