// Table of sines and cosines.
/*
 !------------------------------------------
 ! This program outputs a table of Sine and
 ! Cosines for the angles 0 to 90  in steps
 ! of 5 degrees.
 ! Modular programming is exaggerated. 
 !------------------------------------------
*/
#include <cmath>
#include <iostream>
using namespace std;

void lineout(int d);
double rad(double);

int main () {
  for (int deg=0; deg<=90; deg += 5) lineout(deg);
}

void lineout(int d) {
    cout.precision(5);
    cout << d << " " << sin(rad(d)) << " " << cos(rad(d)) << endl;
}

double rad(double x) {
  const double pi = 3.14159265358979323846;
  return x*pi/180;
}
