




已閱讀5頁(yè),還剩1頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
第一卷Dim n As Integern=Text1.TextIF(n Mod 4 =0 And n mod 1000 or n mod 400 = 0)ThenText2.text =”閏年”ElseText2.text=”非閏年”End IF求和 求積Dim i As integerOpen App.path&”jsdata.txt”For input As #1For i =1 to 15Input #1,arr(i)Next iIf op1.value=ture thenT1.text=Aaa()End ifIf op2.value=ture thenT1.text=Bbb()End ifClose #1寫入文件 *Dim i As Integer, j As Integer, n As IntegerOpen app.path &”zfwj.txt”for output As #1n=val(text1.text)for I =1 to nfor j=1 to iprint #1,”*”;next jprint #1next I close#1第二卷計(jì)算結(jié)果dim n As Integer, I As Integer, s1 As integer,s2 As longn=val(text1.textfor I =1 to ns1=s1+is2=s2+s1next itext2.text=s2求值dim n1 as integer, n2 as integer, n3 as integer,t as integern1= val(text1.text)n2=val(text2.text)n3=val(text3.text)if n1n2 then t=n1:n1=n2:n2=tif n2n3 then t=n2:2=n3:3=tif n1n2 then t =n1:1=n2:2=ttext4.text=n1text5.text=n3建立文件 顯示文件Dim num as string,name as srting, I as integerOpen App.path&”xhxm.txt”for output As #1For I = 1 to 3num=inputbox(“請(qǐng)輸入學(xué)號(hào):“)name = inputbox(“請(qǐng)輸入姓名:“)write #1,num,namenext iclose #1End sub Private sub command2_click()Dim s as string, I as integerOpen app.path &xhxm.txt” for input as # 1Do While Not EoF(1)Line input # 1,sText1.text= text1.text& s & vbCrLfLoopClose #1第三卷求和 輸入N值Dim n As integer, I as integer, sum as integerN= val(text1.text)For I = 1 to nIf I mod 3 =0 then sum = sum+ iNext iText2.text=sum輸入正整數(shù)NDim m As integer, n as integerPrivate sub commad1_click(0Dim c as doubleN=text1.textM=text2.textIf n=”a”and c =”z” or c =“a” and c =”z” then s =s+1Next iLabel1.caption= “共“ & s &”個(gè)英文字母”End sub第四卷轉(zhuǎn)換 十進(jìn)制Dim n as integer,b as stringN=text1.textB=zh(n)Text2.text=b讀取文件 加密Dim s1 as stringPrivate sub command1_click()Open app.path &”jmwb.txt”for input as #1Input #1,s1Text1.text=s1End subPrivate sub command2_click()Dim n As integer, I as integer dim s2 as string, j As stringN=Len(s1)For I =1 to nJ=mid(s1,I,1)J=chr(asc(j)+5)S2=s2&jNext iText2.text=s2生成數(shù)組 降序排列Option base 1 Dim n AS integer,x(15) as integer Private Sub command1_Click(0Dim s1 as string For N= 1 to 15X(N)=int(91 * Rnd +10)S1=s1 &STR(x(N)Next NText1.text =s1End subPrivate sub command2_click()Dim s2 as stringDim I as integer, j AS integer t as integerFor I =1 to 15For j 1 to 15For j=I +1 to 15If x (i)= Asc(“A”) and asc (s)=Asc(“a”) And a
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025山西紅杰人才集團(tuán)有限公司招聘16人筆試參考題庫(kù)附帶答案詳解
- 色彩管理在紡織中應(yīng)用試題及答案
- 合同續(xù)簽意向協(xié)議書
- 網(wǎng)店托管合同協(xié)議書
- 分裝生產(chǎn)企業(yè)合同協(xié)議書
- 送餐合同協(xié)議書模板圖片
- 協(xié)議 合同互換協(xié)議書范本
- 下載售房合同協(xié)議書
- 理賠合同協(xié)議書
- 艾灸兼職合同協(xié)議書
- 2025年江蘇泰州市第四人民醫(yī)院招聘高層次人才15人歷年高頻重點(diǎn)提升(共500題)附帶答案詳解
- 二零二五年度跨境電商合伙人合作協(xié)議書3篇
- 知憲明法與憲同行課件-高一上學(xué)期憲法宣傳周主題班會(huì)
- 脫硫塔拆除施工方案
- 北京二十中2025屆高考英語(yǔ)二模試卷含解析
- 《高速公路電動(dòng)汽車清障救援作業(yè)規(guī)范》
- 五年級(jí)下冊(cè)異分母分?jǐn)?shù)加減法練習(xí)200題有答案
- UL489標(biāo)準(zhǔn)中文版-2019斷路器UL標(biāo)準(zhǔn)中文版
- 【MOOC】建筑結(jié)構(gòu)概論-河南理工大學(xué) 中國(guó)大學(xué)慕課MOOC答案
- 我的家鄉(xiāng)江西吉安
- 肺栓塞病人的術(shù)后護(hù)理
評(píng)論
0/150
提交評(píng)論