MATH.CPP
资源名称:C++100.rar [点击查看]
上传用户:wszmarenbt
上传日期:2013-04-26
资源大小:2552k
文件大小:1k
源码类别:
Windows编程
开发平台:
Visual C++
- //THE PROGRAM IS TO TELL YOU HOW TO USE
- //THE MATH.H LIBRARY .
- //FILE MATH.CPP
- #define HUNDRED 100
- #include <stdio.h>
- #include <conio.h>
- #include <math.h>
- int main(void)
- {
- double CIRCLE,PI,VALUE;
- printf("n -*-*- THE MATH FUNCTIOIN 'SIN()' & 'COS()'& 'TAN()'-*-*-n");
- printf("nTHE DEGREE");
- printf(" THE SIN() VALUE");
- printf(" THE COS() VALUE ");
- printf(" THE TAN() VALUE n");
- PI=3.1415926;
- for (CIRCLE=0;CIRCLE<HUNDRED;CIRCLE+=10)
- {
- VALUE=CIRCLE*PI/180;
- printf("%2d",(int)CIRCLE);
- printf(" %6.4f",sin(VALUE));
- printf(" %6.4f",cos(VALUE));
- printf(" %6.4f",tan(VALUE));
- printf("n");
- }
- getch();
- return 0;
- }