User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:math.h:tan

Table of Contents

tan

    double tan(double);

Returns the tangent of a radian angle x.

C Sourcecode Example

compile with gcc tan.c -o tan -lm

#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
 
#include <math.h> /* including math library */
 
int main( void )
{
    double x;
    x = 42;
 
    printf ("tan of %lf° is %lf\n", x, tan (x*3.1415/180));
    return 0;
}

output

 output:
 user@host:~$ ./tan 
 tan of 42.000000° is 0.900365

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/math.h/tan.txt · Last modified: 2024/02/16 01:05 (external edit)

Impressum Datenschutz