2004-11-09
用c语言编写。
下面程序在屏幕上画一条正弦曲线(如不满意可自己修改程序)
该程序基于Turbo C 2。0编写
#include "stdil。h"
main()
{
char p[30];
int ts;
double rd,n,sin(),cos();
rd=3。 1415926/180;
printf(" -1 0 1\n");
printf(" I。。。。。。。。。。I。。。。。。。。。。I\n");
for(n=0;n<=360;n=n+15)
{
strcpy*(p," I ");
ts=(int)(...全部
下面程序在屏幕上画一条正弦曲线(如不满意可自己修改程序)
该程序基于Turbo C 2。0编写
#include "stdil。h"
main()
{
char p[30];
int ts;
double rd,n,sin(),cos();
rd=3。
1415926/180;
printf(" -1 0 1\n");
printf(" I。。。。。。。。。。I。。。。。。。。。。I\n");
for(n=0;n<=360;n=n+15)
{
strcpy*(p," I ");
ts=(int)(10+10*sin(n*rd));
p[ts}='*';
printr("%5。
0f %s\n",n,p);
}
}
。收起