1. 计算出1到100的平方根,将结果存于外存,其文件名字为“result.c”。用vf做

2024-12-21 18:53:22
推荐回答(2个)
回答1:

√1=1;
√2=1.4142135623731;
√3=1.73205080756888;
√4=2;
√5=2.23606797749979;
√6=2.44948974278318;
√7=2.64575131106459;
√8=2.82842712474619;
√9=3;
√10=3.16227766016838;
√11=3.3166247903554;
√12=3.46410161513775;
√13=3.60555127546399;
√14=3.74165738677394;
√15=3.87298334620742;
√16=4;
√17=4.12310562561766;
√18=4.24264068711928;
√19=4.35889894354067;
√20=4.47213595499958;
√21=4.58257569495584;
√22=4.69041575982343;
√23=4.79583152331272;
√24=4.89897948556636;
√25=5;
√26=5.09901951359278;
√27=5.19615242270663;
√28=5.29150262212918;
√29=5.3851648071345;
√30=5.47722557505166;
√31=5.56776436283002;
√32=5.65685424949238;
√33=5.74456264653803;
√34=5.8309518948453;
√35=5.91607978309962;
√36=6;
√37=6.08276253029822;
√38=6.16441400296898;
√39=6.2449979983984;
√40=6.32455532033676;
√41=6.40312423743285;
√42=6.48074069840786;
√43=6.557438524302;
√44=6.6332495807108;
√45=6.70820393249937;
√46=6.78232998312527;
√47=6.85565460040104;
√48=6.92820323027551;
√49=7;
√50=7.07106781186548;
√51=7.14142842854285;
√52=7.21110255092798;
√53=7.28010988928052;
√54=7.34846922834953;
√55=7.41619848709566;
√56=7.48331477354788;
√57=7.54983443527075;
√58=7.61577310586391;
√59=7.68114574786861;
√60=7.74596669241483;
√61=7.81024967590665;
√62=7.87400787401181;
√63=7.93725393319377;
√64=8;
√65=8.06225774829855;
√66=8.12403840463596;
√67=8.18535277187245;
√68=8.24621125123532;
√69=8.30662386291807;
√70=8.36660026534076;
√71=8.42614977317636;
√72=8.48528137423857;
√73=8.54400374531753;
√74=8.60232526704263;
√75=8.66025403784439;
√76=8.71779788708135;
√77=8.77496438739212;
√78=8.83176086632785;
√79=8.88819441731559;
√80=8.94427190999916;
√81=9;
√82=9.05538513813742;
√83=9.1104335791443;
√84=9.16515138991168;
√85=9.21954445729289;
√86=9.2736184954957;
√87=9.32737905308882;
√88=9.38083151964686;
√89=9.4339811320566;
√90=9.48683298050514;
√91=9.53939201416946;
√92=9.59166304662544;
√93=9.64365076099295;
√94=9.69535971483266;
√95=9.74679434480896;
√96=9.79795897113271;
√97=9.8488578017961;
√98=9.89949493661167;
√99=9.9498743710662;

----------------------------
for(b=1;b<100;b++){
s=(b)**(1/2);
}
print s

回答2:

Modify command main.prg
for i=1 to 100
x=i^(1/3)
strtofile(str(x,10,7),"result.c",.t.)