Tuesday, February 27, 2018

3) Program for sin(), cos(), tan(), sinh(), cosh(), tanh(), log(), log10(), and exp() in C.


/* Program for Sin(),cos(),tan(),exp(), and Log() value */

#include <stdio.h>

#include <math.h>

int main()

{

float i = 0.314;

float j = 0.25;

float k = 6.25;

printf("\n Enter three Values to Find the sin(), cos(),tan(),sinh(),cosh(),tanh(),log(),log10(),exp(), Tangent Values :");

scanf("%f %f %f",&i, &j, &k);

float sin_value = sin(i);

float cos_value = cos(i);

float tan_value = tan(i);

float sinh_value = sinh(j);

float cosh_value = cosh(j);

float tanh_value = tanh(j);

float log_value = log(k);

float log10_value = log10(k);

float exp_value = exp(k);

printf("The value of sin(%f) : %f \n", i, sin_value);

printf("The value of cos(%f) : %f \n", i, cos_value);

printf("The value of tan(%f) : %f \n", i, tan_value);

printf("The value of sinh(%f) : %f \n", j, sinh_value);

printf("The value of cosh(%f) : %f \n", j, cosh_value);

printf("The value of tanh(%f) : %f \n", j, tanh_value);

printf("The value of log(%f) : %f \n", k, log_value);

printf("The value of log10(%f) : %f \n",k,log10_value);

printf("The value of exp(%f) : %f \n",k, exp_value);

return 0;

}
Output

Program for sin(), cos(), tan(), sinh(), cosh(), tanh(), log(), log10(), and exp() in C.


No comments:

Post a Comment

Life Articles And News:

Life Articles And News: