Assignment 9

 

 

 

#include <iomanip.h>

#include <stdlib.h>

#include <math.h>

void main(void)

 

{

float angle, sine, cosine, tangent;

cout <<“Enter an angle value in radians ";

cin >> angle;

sine = sin(angle);

cosine =  cos(angle);

tangent = tan(angle);

cout<<setprecision(4)<<setiosflags(ios::fixed);

cout <<“\nSine of “<<setw(6)<<angle <<“ radians is “<<setw(6)<<sine;

cout <<“\nCosine of “<<setw(6)<<angle <<“ radians is “<<setw(6)<<cosine; cout <<“\nTangent of “<<setw(6)<<angle <<“ radians is “<<setw(6)<<tangent<<”\n”;