vb编写程序,输出7的倍数中十位数为2的所有3位数(要求每行输出5个)
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/10 09:06:21
privatesubcommand1_click()dimmaxfori=1to3n=val(inputbox("输入第"&i&"个数"))ifn>maxthenmax=nendifnextprint
简单写一下代码流程dima(20)fori=0to19a(i)=inputbox(“输入第"+str(i+1)+"个数")nextisum=0fori=0to19sum=sum+a(i)nexti备注
PrivateSubCommand1_Click()Dima(9),i%,Sum!ClsFori=0To9Randomizea(i)=Int(Rnd*51+140)/10Sum=Sum+a(i)Pri
PrivateSubForm_click()DoUntili+7>100i=i+7Printi;LoopEndSu
privatesubform_click()dimnaslong,snaslongn=inputbox("请输入n")fori=0tonsn=sn+2*i+1nextmsgbox"1+3+5+...(
Function Exchange(ByVal num As Integer) If num
PrivateSubCommand1_Click()DimiAsIntegerDimnAsIntegern=0Fori=1To100IfiMod3=0Thenn=n+1Printn;iEndIfNex
PrivateSubCommand1_Click()Dima,xAsSinglea=Val(Text1.Text)Ifa再问:x=x+a*0.2+3000*0.2怎么都乘0.2呀?
PrivateSubCommand1_Click()Dimi%Fori=100To999IfiMod7=0AndMid(CStr(i),2,1)="2"ThenPrintiNextEndSub再问:M
Subabc()'输入三角形三个边长,计算其面积Dima,b,c,sDos=InputBox("请输入三角形的三个边长,用半角逗号分隔."&Chr(13)&"输入-1时结束程序.")IfVal(s)=
Subtest()DimiAsIntegerDimjAsIntegerDimkAsIntegerDimXAsIntegerFori=1To9X=0Forj=0To9Fork=0To9If(i*100+
while(m
#includeusingnamespacestd;intmain(){intf[11]={0,1,1};inti,j,n;for(i=3;i{f[i]=f[i-1]+f[i-2];i
PrivateSubCommand1_Click()a=Abs(InputBox("请输入第一个整数","输入数据"))b=Abs(InputBox("请输入第二个整数","输入数据"))c=Abs(
PrivateSubCommand1_Click()Fori=1To100Forj=1ToiFork=1TojIfi^2=j^2+k^2ThenPrinti;j;kNextkNextjNextiEnd
Sub Main() dim i as integer, n as integer&
dimxasinteger,dimsumasintegerforx=1to100ifxmod3=0thensum=sum+xendifnextxprintsum
将六个圆命名为“Oval1”直到“Oval6”在窗体上放6个timer控件.写入如下代码:Private Sub Form_load()'必要的初始化操作Timer1.in
拜托,这么多输入你就用列表啦,用那么多textbox,你不累我看得都累.还有,你要求的是什么尽量用数学的方式表达出来,有图更好至于你的a5d6的问题,是因为你的是字符串运算而不是数值运算,转换一下类型
你试试把d=a+c改为,d=Val(a)+Val(c)应该没问题了