Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a programme that displays (using a loop) the values zero to 45 in steps of

ID: 3628089 • Letter: W

Question

Write a programme that displays (using a loop) the values zero to 45 in steps of 5 (ie 0,5,10,15,20…45).

Assuming these to be the values of an angle in degrees you should also display the corresponding sine, tangent and cosine values. The values should be presented as a table as shown in Figure. Decimal numbers must be displayed to two decimal places

Angle Sine Cos Tan
0 0.00 1.00 0.00
5 0.09 1.00 0.09
10 0.17 0.98 0.18
15 0.26 0.97 0.27
20 0.34 0.94 0.36
25 0.42 0.91 0.47
30 0.50 0.87 0.58
35 0.57 0.82 0.70
40 0.64 0.77 0.84
45 0.71 0.71 1.00

Explanation / Answer

please rate - thanks

#include <stdio.h>
#include <math.h>
int main()
{
int i;
double x;
printf("Angle Sine Cos Tan ");
for(i=0;i<=45;i+=5)
{x=i*3.1415/180.;
    printf("%d %3.2f %3.2f %3.2f ",i,sin(x),cos(x),tan(x));
}
  
getch();
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote