📄 tst_cos.c
字号:
#include <math.h>
#include <stdio.h> /* for printf */
void tst_cos (void) {
float x;
float y;
for (x = 0; x < (2 * 3.1415); x += 0.1) {
y = cos (x);
printf ("COS(%f) = %f\n", x, y);
}
}
void tst_sin (void) {
float x;
float y;
for(x =0;x <(2 *3.1415); x += 0.1) {
y = sin (x);
printf ("SIN(%f) = %f\n", x, y);
}
}
void tst_tan (void) {
float x, y, pi;
pi = 3.14159;
for (x = -(pi/4); x < (pi/4); x += 0.1) {
y = tan (x);
printf ("TAN(%f) = %f\n", x, y);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -