Dim n% n = 1 Do Until n > 6 Print n; n = n + 2.4 Loop
问题描述:
Dim n% n = 1 Do Until n > 6 Print n; n = n + 2.4 Loop
运行结果为1,3,5
为什么不是1,3,6
答
3+2.4=5.4,对应整数是5,不是6.
相关推荐
- 英语翻译1、an interesting place to go or thing to do_ _ _ _ _ _ _ i _ _2、talk with someone and ask him or her questions about something_ _ _ _ _ _ _ _ _3、under the surface of the ground_ _ _ e _ _ _ o _ n _4、something that gives people pleasure or fun_ _ _ _ _ _ e _ _5、a mark made on the ground by a foot_ _ _ _ p _ _ _ _6、a person,a animal in a book ,play ,film,ect._ _ _ _ a _ _ _ _7、letters,parcels,ect.,sent by postm _ _ _8、the land beside the sea_ _ _ _
- vb用function编写一个产生随机整数过程,输出n个指定范围的随机整数Sub sj(i%,a%,b%)Dim x%x = Int(Rnd * (b - a + 1)) + aEnd SubPrivate Sub Command1_Click()Dim n%,a%,b%,i%,x%n = InputBox("请输入随机整数的个数n")a = InputBox("请输入取值范围的下限a")b = InputBox("请输入取值范围的上限b")For i = 1 To nCall sj(x,a,b)Print x;Next iEnd Sub为什么运行出来的都是零
- 已知O是三角形ABC的外心,AB=2 AC=1,角BAC=120°.若向量AO=m*向量AB+n*向量AC 则m+n=由余弦定理:BC=(AB^2+AC^2-2*AB*AC*cos120°)^(1/2)= (4+1+2) ^(1/2)=7^(1/2)则 AO=(BC/2)/cos30°=(7/3)^(1/2)过O作AC的垂线与AC交于D,再过O作AB的平行线与AC的延长线交于E,则 DO=(AO^2-(AC/2)^2)^(1/2)=(7/3-1/4)^(1/2)=(25/12)^(1/2)∵∠DEO=60°∴DO/EO=cos30°∴EO=DO/cos30°=(25/12)^(1/2)*(2/3^(1/2))=5/3∴DE=EO/2=5/6∴AE=DE+AC/2=5/6+1/2=4/3过O作AC的平行线与AB交于F,则四边形FAEO是平行四边形,向量AO=向量AF+向量AE=m*向量a+n*向量b∴|向量AF|=m*|向量a|,|向量AE|=n*|向量b|∵|向量AF|=EO=5/3,|向量a|=
- 根据首字母填空(英语)详见“补充说明”1.They u_____ go to work on foot.2.Tom s_____goes out.3.He is n_____late for school.4.S_____he cleans the room with his dad.5.Do you a_____get up early6.His dad o_____goes fishing on Sundays
- 问两道SAS Base题目40.The following SAS program is submitted:data work.pieces; do while (n lt 6); n + 1; end; run; What is the value of the variable N in the output data set?A.5 B.6 C.7 D..(missing numeric) Answer:B 为什么答案选B?一开始n没有被定义啊,在do while里n应该是missing啊.你在n+1的时候才被赋值为0的吧……48.Given the raw data file CALENDAR:----|----10---|----20---|----30 01012000 The following SAS program is submitted:data test; infile 'calendar'; input @1 date mmddyy10.; if date = '010
- VB求助:求Sn=a+aa+aaa+aaaa+…+aa…aaa(n个a),其中a是一个由随机数产生的1~9(包括1、9)中的一个正整数,n是一个由随机数产生的4~9(包括4、9)中的一个正整数,产生随机数需使用Randomize语句.例如,当a=2,n=5时,Sn=2+22+222+2222+22222表达式:Private Sub Command1_Click()Dim a As IntegerDim n As IntegerDim s As StringRandomizea = Int(Rnd() * 9) + 1n = Int(Rnd() * 6) + 4For i = 1 To n s = s + String(i, CStr(a)) If i n Then s = s + "+"NextPrint "当a=" & a & "时,n=" & n & "时, S=" & sEnd Sub问题:表达式中“ If i n Then s = s + "+" ”这句的意思和作用是什么?
- x0],{k,0,n,1}]EndPackage[]这种是很不完善的,在用户输入函数的时候,应该要首先判断是否存在导数,偶不知道要怎么编这个程序,小女子感激不尽" target="_blank"> 用mathematica求高阶导数计算问题有这样一个题目是高阶导数的计算问题:请设计一个程序包用于求一元函数的高阶导数和导数值,要求运行时只要用户输入函数,求导的阶数和求导数值的点就计算并告知用户所求高阶导数和导数值.谢谢你能帮我,你先看看我的程序吧:BeginPackage["daoshu`"]daoshu::Uasage = "for f(x) and x=x0,Calculus derivations of n order"f[x_] = Input["input f[x]="]n = Input["jieshu shi n="]x0 = Input["qiu dao de dian x0="]Do[Print["x=",x0,"derivatives of f(x) ",k,"order",D[f[x],{x,k}] /.x -> x0],{k,0,n,1}]EndPackage[]这种是很不完善的,在用户输入函数的时候,应该要首先判断是否存在导数,偶不知道要怎么编这个程序,小女子感激不尽
- 1,The road was so n() that the truck couldn't pass.2,Yesterday I took part in the b() 100-metre race.3,A 12-year-old boy named Li Lida successfully went a() the Qiongzhou Channel.4,Don't draw pictures on p() walls.5,You should pick up the rubbish and throw it into a d().6,When the sun came out,the snow d() soon,melted.7,Do you know that some dinosaurs were covered with f()?8,The s() surfer is quite different from the so called beach boys.9,Don't forge
- 把英语补充完整①mag_z_ne ②pol_cem_n ③p_st c_rd ④ d____ving ⑤viol___⑥art_st 1.What____you going______do tomorrow?I____ _____ to the cinema.2.________you like reading books?3._______you have a pen friend?Yes,she____in Shanghai4.Put thr flower______the sun.5.I_____a pen pal,____about you?6.I live_____the USA with my mom.7.What____your aunt_____?She____an engineer.8.I’m____to be an English teacher.
- 在程序的横线处填写适当的语句(一条横线处只能填写一条语句)是程序完成相应的计算程序计算sn 的值 sn=a+aa+aaa+...+aaa...a 其中最后一项为n个例如 a=5 n=4 则:sn=5+55+555+5555dim a as integer ,n as integer,cout as integerdim sn as long ,tn as longcount=1:sn=0,tn=0a=inputbox("请输入a的值")___________________dotn=tn+a*10^(count-1)sn=sn+tncount=count+1___________________debug.print a,n,snn=inputbox("请输入n的值")loop while coutn分数以后追加.中间两条横线是填空第一条答案是n=inputbox("请输入n的值")第二条答案是loop while coutn
- 1.气态物质没有一定的体积,那气体燃料为何又讲单位体积?
- 如题 .I don't koow how l can help her with her studies同义句 .