程序:
#include stdio.h
#include math.h
float aw=500,a=0.92,s=70,E=2.1e5;
float c,k,R0,Fw,fc,fa,H0,L;
float L1[20],h1[20],R[20];
int n,b;
FILE *save;//
int radius()
{ float H[20],a0[20],W[20],sum=0;
int i,xx;
printf(Please input a0[i]=(input n numbers):\n);
fprintf(save,please input a0[i]=(input n numbers):\n);//
for(i=1;in+1;i++)
{ scanf(%f,a0[i]);
W[i]=(b*h1[i]*h1[i])/6;
fprintf(save,a0[%d]=%f\n,i,a0[i]); }
for(i=1;in+1;i++)
{ R[i]=R0/(1+(2*a0[i]*R0)/(E*h1[i]));
H[i]=(L1[i]*L1[i])/(8*R[i]);
sum+=(a0[i]*W[i]); }
for(i=1;in+1;i++)
{printf(The radius of the spring R[%d] is %f and the hight of the arc H[%d] is %f\n,i,R[i],i,H[i]);
fprintf(save,The radius of the spring R[%d] is %f and the hight of the arc H[%d] is %f\n,i,R[i],i,H[i]);}
if((sum-50)(sum50))
{printf(a0[i] is suitable!\n);
fprintf(save,a0[i] is suitable!\n); //
xx=1; }
else
{printf(a0[i] is not appropriate,select a0[i] again\n);
fprintf(save,a0[i] is not appropriate,select a0[i] again\n); //
xx=0;}
return(xx);}
int check2()
{ float sum1=0,sum2=0,H1,R01;
int i,yy;
for(i=1;in+1;i++)
{sum1+=(L1[i]/R[i]);
sum2+=L1[i];}
R01=sum2/sum1;
H1=(L*L)/(8*R01);
printf(R01=%f,The hight of the spring in total H1 is %f\n,R01,H1);
fprintf(save,R01=%f,The hight of the spring in total H1 is %f\n,R01,H1);//
if(fabs(H0-H1)50)
{printf(a0[i] is suitable!\n);
fprintf(save,a0[i] is suitable!\n); //
yy=1;
getchar();}
else
{printf(a0[i] is not appropriate, select a0[i] again\n);
fprintf(save,a0[i] is not appropriate, select a0[i] again\n); //
yy=0;
getchar();}
return(yy);}
void length1()
{ float lb;
printf(Please input the axle distance, L\n);
printf(lb can be 2000~2200 ,input lb=);
scanf(%f,lb);
L=lb/2;
printf(L=%f\n,L);
fprintf(save,L=%f\n,L); }
void section3()
{ float dr,xt,J0,J01,W0,hp,b1[5];
int flap,h,i,n1,n0;
printf(Please input flap for confirm the
您可能关注的文档
最近下载
- 学会欣赏艺术养成对美的感知习惯.pptx VIP
- 二手书微信小程序的设计与实现.docx VIP
- 2025年及未来5年中国超硬石膏粉市场数据分析及竞争策略研究报告.docx
- 技术进步与社会生活的变化 教学设计 高二历史统编版(2019)选择性必修2+经济与社会生活.docx VIP
- 专题12.27 全等三角形几何模型分类专题(全章专项练习)(学生版) 2024-2025学年八年级数学上册基础知识专项突破讲与练(人教版).pdf VIP
- 梗阻性黄疸患者护理查房.pptx VIP
- 梗阻性黄疸患者护理查房.pptx VIP
- 2025-2026学年八年级上册数学 人教版 期末综合复习试题(含答案).pdf VIP
- 2025年湖南有色金属职业技术学院单招职业技能考试题库及答案.docx VIP
- 加油站安全专项整治工作方案范文集合5篇.doc VIP
原创力文档

文档评论(0)