#include <math.h> #define FOUT (200.0)
算下来,某些人的参数设置有点小问题 main() { const float fin=12.0; int t,i; int m,p,s; float fout,fvco;
for (s=0;s<4;s++) for (p=2;p<(64+2);p++) for (m=8;m<(256+8);m++) { t=1; for (i=0;i<s;i++) t*=2; fout = fin*m/(p*t); if (fabs(FOUT-fout)<0.1) { fvco=fin*m/p; if (((fin/(25*p))<(28.449/m))&&(fin/(10*p))>(28.449/m)) if ((0.7<(8.456/sqrt(m)))&&(8.456/sqrt(m))<1.8) if ((160<=fvco)&&(fvco<=400)) if ((20<=fout)&&(fout<=203)) printf ("M=%d P=%d s=%d fout=%8.4f
",m-8,p-2,s,fout); } }
} |