C语言高手快来帮帮忙!!!
#include "stdio.h"#include "math.h"
#define pi 3.14159265359
main()
{
int ls;
float x1,y1,r,t,ly,e,j,x2,y2,q,g,x3,y3,jd1,jd2,s,d,a,b,a1,b1,l,zh,hz,hy,yh,qz;
double n1,n2,u;
printf("qing shu ru jd1 he jd2 de x,y zhou zhi");
scanf("%f,%f,%f,%f",&x1,&y1,&x2,&y2);
a=x2-x1;
b=y2-y1;
if(a>0)
{
if(b>0)
n1=atan (abs(b/a)) ;
else
n1=360-atan(abs(b/a));
}
else
{ if(b>0)
n1=180-atan(abs(b/a));
else
n1=180+atan(abs(b/a));
}
{
printf("qing shu ru jd3 de x,y zuo biao zhi");
scanf("%f,%f",&x3,&x3);
a1=x3-x2;
b1=y3-y2;
if(a1>0)
{
if(b1>0)
n2=atan(abs(b1/a1)) ;
else
n2=360(这个其实是角度,我不知道怎么输入)-atan(abs(b1/a1));
}
else
if(b1>0)
n2=180-atan(abs(b1/a1));
else
n2=180+atan(abs(b1/a1));
} /*判断n1,n2的方位角*/
u=n2-n1; /*u是转角*/
printf("qing shu ru ls,r de zhi");
scanf("%f,%f",&ls,&r);
q=ls/2-(ls*ls*ls)/(240*r*r); /*切线增长量*/
s=sqrt(ls*r); /*缓和曲线参数*/
g=(ls*ls)/(24*r)-(ls*ls*ls*ls)/(2384*r*r*r); /*圆曲线内移值*/
t=(r+g)*(tan(u/2))+q; /*切线长*/
l=(pi/180)*u*r+ls; /*曲线长*/
ly=l-2*ls; /*圆曲线长*/
e=(r+g)*(1/(cos(u/2)))-r; /*外矩长*/
j=2*t-l; /*修正值*/
printf("qing shu ru jd1 de zhuang hao");
scanf("%f",&jd1);
d=sqrt(a*a+b*b);
jd2=jd1+d-j; /*jd2的桩号*/
zh=jd2-t;
hy=zh+ls;
yh=hy+ly;
jd2=qz+j/2; /*检验*/
printf("shu chu shu ju");
printf("jd2=%f\n,zhuanjiao=%f\n,q=%f\n,neiyizhi=%f\n,T=%f\n,L=%f\n,ly=%f\n,E=%f\n,j=%f, zh=%f, hy=%f, yh=%f, hz=%f, qz=%f, s=%f",jd2,u,q,g,t,l,ly,e,j,zh,hy,yh,hz,qz,s);
getch();
}
还有角度我不知道怎么表示,麻烦大侠帮忙修改下。!输入交点1的桩号后,就直接关闭了。下边有提示说“可能”qz“和”hz“在定义以前使用了它在main函数中。顺便问下,那个角度值直接输入360、180可以吗?