计算机代码Word格式文档下载.docx

上传人:b****7 文档编号:22974740 上传时间:2023-02-06 格式:DOCX 页数:9 大小:15.30KB
下载 相关 举报
计算机代码Word格式文档下载.docx_第1页
第1页 / 共9页
计算机代码Word格式文档下载.docx_第2页
第2页 / 共9页
计算机代码Word格式文档下载.docx_第3页
第3页 / 共9页
计算机代码Word格式文档下载.docx_第4页
第4页 / 共9页
计算机代码Word格式文档下载.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

计算机代码Word格式文档下载.docx

《计算机代码Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《计算机代码Word格式文档下载.docx(9页珍藏版)》请在冰豆网上搜索。

计算机代码Word格式文档下载.docx

Picture1.Print

Nexti

EndSub

PrivateSubCommand2_Click()

Dimsun1AsInteger

sum1=0

sum1=sum1+a(i,j)

Text1.Text=Text1.Text&

sum1&

vbCrLf

PrivateSubCommand3_Click()

Dimsum2AsInteger

sum2=0

sum2=sum2+a(i,j)

Text2.Text=Text2.Text&

sum2&

"

PrivateSubCommand4_Click()

Dimsum3AsInteger

Ifi+j=v1+1Ori=jThensum3=sum3+a(i,j)

Text3.Text=sum3

数组

(2)

Sort(i)=10+int(rnd*90)

i10

sort(i)>

sort(j)

数组(3)

第一种先输入n的值,然后点击按钮则同时在picture和text中出现两个矩阵

text2的multiline属性要改为ture

Optionbase1

PrivateSubCommand1_click()

Dima()asinteger

Dimnasinteger,iasinteger,jasinteger,tempasinteger

n=val(text2.text)

redima(n,n)

fori=1ton

forj=iton

a(i,j)=10+int(rnd*90)

picture1.printa(i,j);

nextj

picture1.print

nexti

fori=1ton

forj=1ton

temp=a(I,j)

a(I,j)=a(j,i)

a(j,i)=temp

text1.text1=text1.text&

a(I,j)&

“”

text1.text=text1.text&

vbcrlf

第二种输入n后picture生成矩阵,点下按钮则进行转置

注意同上

Dima()AsInteger

DimnAsInteger,iAsInteger,jAsInteger,tempAsInteger

PrivateSubText2_change()

n=Val(Text2.Text)

ReDima(n,n)

Fori=1Ton

Forj=1Ton

Forj=iTon

temp=a(i,j)

a(i,j)=a(j,i)

a(j,i)=temp

a(i,j)&

过程

(1)

sum=sum+score(i)

round(av,1)

a()assingle,maxvassingle,minvassingle

forI=2toubound(a,1)

过程

(2)

2n-1

Exitfunction

true

val(text1.text)

3

Judge(i)

i=i+2

过程(3)

DimiAsInteger

Fori=10To9999

Ifarm(i)ThenPrinti

PrivateFunctionarm(xAsInteger)AsBoolean

n=Len(CStr(x))

sum=sum+Mid(x,i,1)^n

Ifsum<

>

xThen

ExitFunction

Else

arm=True

EndIf

EndFunction

综合

(1)

DimiAsInteger,jAsInteger,maxAsInteger,minAsInteger,maxhgsAsInteger,maxlesAsInteger,minhgsAsInteger,minlesAsInteger

Dima(4,5)AsInteger

Fori=1To4

Forj=1To5

a(i,j)=10+Int(Rnd*31)

max=a(1,1):

min=a(1,1):

maxhgs=1:

maxles=1:

minhgs=1:

minles=1

Ifa(i,j)>

maxThenmax=a(i,j):

maxhgs=i:

maxles=j

Ifa(i,j)=maxThenPicture2.Printa(i,j);

i;

j

Ifa(i,j)<

minThenmin=a(i,j):

minghs=i:

minles=j

Ifa(i,j)=minThenPicture2.Printa(i,j);

Picture1.Cls

Picture2.Cls

End

综合

(2)

text3的multiline属性要改为ture

DimaAsInteger,bAsInteger,iAsInteger,xAsInteger

a=Val(Text1.Text)

b=Val(Text2.Text)

Text3.Text="

幻影素数对:

"

Fori=aTob

x=0

Forj=len(cstr(i))to1step-1

x=Mid(i,j,1)&

x

Ifpu(i)Andpu(x)ThenText3.Text=Text3.Text&

vbCrLf&

i&

和"

&

PrivateFunctionpu(xAsInteger)AsBoolean

Fori=2Tox-1

IfxModi=0ThenExitFunction

pu=True

Text1.Text="

Text2.Text="

Text1.SetFocus

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 考试认证 > IT认证

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1