Mathc initiation/Fichiers c : c02e
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c02e.c |
---|
/* ------------------------------ */
/* Save as : c02e.c */
/* ------------------------------ */
#include <stdio.h>
#include <ctype.h>
#include <math.h>
/* ------------------------------ */
#include "z_s.h"
/* ------------------------------ */
int main(void)
{
double x;
clrscrn();
x = .5;
printf(" cos(%.1f) = %f \n", x, cos(x));
printf(" sin(%.1f) = %f \n", x, sin(x));
printf(" tan(%.1f) = %f \n", x, tan(x));
printf("\n\n");
x = .5;
printf(" acos(%f) = %.1f \n", cos(x), acos(cos(x)));
printf(" asin(%f) = %.1f \n", sin(x), asin(sin(x)));
printf(" atan(%f) = %.1f \n", tan(x), atan(tan(x)));
printf("\n\n");
stop();
return 0;
}
/* ------------------------------ */
/* ------------------------------ */
Les fonctions trigonométrique.
Il faut inclure le fichier <math.h>
Exemple de sortie écran :
cos(0.5) = 0.877583
sin(0.5) = 0.479426
tan(0.5) = 0.546302
acos(0.877583) = 0.5
asin(0.479426) = 0.5
atan(0.546302) = 0.5
Press return to continue.