How can you write a c program that prints a table of trigonometric values for sin cos and tan?

1 answer

Answer

1041581

2026-07-09 08:35

+ Follow

#include<stdio.h>

#include<conio.h>

#include<math.h>

void main()

{

const float pi=3.14;

float angle,radian;

clrscr();

printf("Angle\t Radian\t\t sin\t\t cos\t\t tangent");

for(angle=0;angle<=180;angle+=10)

{

radian=(pi/180.0)*angle;

printf("\n%0.0f\t%f\t%f\t%f\t%f",angle,radian,sin(radian),cos(radian),tan(radian));

}

getch();

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.