1、#include#includevoid main()float pi,d0,d,d30,d1,d2,d20,d3, d31,t,fai,v,a1,a2;float f,p,a7,a8,l,l10,l1,b,b1,h,h1,z,z1,a,tao;float dd,dd0,dd01,dd1,dd11,dd2,dd3,dd4,dd40,dd5,dd6,dd7;long double a3,a4,a5,a6,sg,sg1,sg2,sg3,sg4,fcr,i,s;pi=3.1415926;v=4.735;f=23000.0;printf(“输入 p 和 d2n“);scanf(“%f,%f“,a1=p
2、/(pi*d2);fai=atan(a1)*180/pi;if(fai3.5)printf(“稳定性满足要求 S=%f“,s);elseprintf(“稳定性不符 S=%fn“,s);printf(“螺纹牙圈计算n“);d20=d2/1000.0;z=1000*f/(pi*d20*0.5*p*1.5E7);if(z10)printf(“z=%fn“,z);z1=z+1.5;h=z1*p; /*h=H*/printf(“H=%fn“,h);elseprintf(“齿数太多 z=%fn“,z);printf(“请输入 D4n“);scanf(“%f“,dd4=dd40/1000;a7=1.66*f
3、/(0.83*5E7);a8=dd4*dd4;dd=sqrt(a7+a8);dd0=dd*1000+2;printf(“D=%dn“,(int)dd0);dd01=dd0/1000;sg1=1.3*4*f/(pi*(dd01*dd01-dd4*dd4);if(sg10.83*5E7)printf(“螺母强度满足n“);elseprintf(“螺母强度不满足n“); /*/dd11=1.34*dd0;printf(“D1=%fn“,dd11);a=h/3;printf(“a=%fn“,a);a1=0.65*0.65*p*p*26.5*pi*z;sg2=(3*f*0.5*p)/a1;if(sg250)printf(“牙纹强度符合 sg 牙纹=%fn“,sg2);elseprintf(“牙纹强度不符 sg=%f“,sg2); /*/a2=0.65*p*26.5*pi*z;tao=f/a2;printf(“tao=%fn“,tao);if(tao30)printf(“满足剪切强度n“);elseprintf(“不满足剪切强度n“); /*/