如何用c语言画出y=sinx的图像.要求水平为x轴,竖直方向为y轴,不允许使用数学库.意思是要自己定义函数.

问题描述:

如何用c语言画出y=sinx的图像.要求水平为x轴,竖直方向为y轴,不允许使用数学库.意思是要自己定义函数.
希望写出具体的c语言过程,如果好的话会加分
1个回答 分类:综合 2014-11-01

问题解答:

我来补答
#include
#include
#define pi 3.1415926
#define MAX_W 50000
main()
{
\x09void sin_curv(int w, int h, int ang);
\x09int w,h,ang;
\x09scanf("%d %d %d",&w,&h,&ang);
\x09sin_curv(w,h,ang);
\x09return 0;
}
void sin_curv(int w, int h, int ang)
{
\x09char str[MAX_W];
\x09int s,i,j;
\x09double d;
\x09for(i=0;i
 
 
展开全文阅读
剩余:2000
上一页:圆向量