标题:很菜很菜的菜鸟急需高手帮忙!!!!!!!!
取消只看楼主
young1988
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2010-5-19
结帖率:100%
已结贴  问题点数:5 回复次数:0 
很菜很菜的菜鸟急需高手帮忙!!!!!!!!
#include"stdio.h"
#include"math.h"
void main()
{double p,q,m,t,x1,x2,w;
double y;
long double x;
printf ("请依次输入:刀齿半径,圆周线速度,机器前进速度,运行时间");
scanf("%f,%f,%f,%f",&p,&q,&m,&t);
if(q/m==1)printf("标准摆线");
else if (q/m<1)printf("长辐摆线");
else if (q/m>1)printf("短辐摆线");
w=q/p;
printf("角速度为:%f\n",w);
y=w*t;
printf("角位移为:%f\n",y);
x1=m-q*cos(y);
x2=q*sin(y);
x=(x1)^2+(x2)^2;
printf("刀齿切削x方向分速度为:%f\n",x1);
printf("刀齿切削y方向分速度为:%f\n",x2);
printf("刀齿切削速度为:%f\n",x);
}试运行后显示error C2297: '%' : illegal, right operand has type 'double'请高手帮忙检查下  (cos函数里的只能定义double类型么?x定义long double不能运行时因为定义类型无法满足要求么?)
搜索更多相关主题的帖子: include double 角速度 
2010-05-19 23:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-307406-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012864 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved