cos

Overview :

The "cos" function is used for calcution of the cosine value of a given input.

Syntax :
double cos(double x);
Description :

The "cos" function accepts 1 parameters

  • x -> The x is the number whose cosine value is to be found

"cos" function return the cosine value of a number.

Example :
#include <stdio.h>
 #include <math.h>
 #include<conio.h>

 int main()
 {
    double x,cos_value;
	clrscr();
	printf("\nEnter the number : ");
	scanf("%lf",&x);

    cos_value = cos(x);
    printf("The cos value is %lf\n", cos_value);
    getch();
    return 0;
}

Comments

comments powered by Disqus