




已閱讀5頁,還剩1頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
第一卷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(“請輸入學(xué)號:“)name = inputbox(“請輸入姓名:“)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 &”個英文字母”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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 智慧農(nóng)業(yè)新質(zhì)生產(chǎn)力專題學(xué)習(xí)
- ktv安全管理制度范本
- 學(xué)校安全生產(chǎn)月活動簡報
- 施工吊籃安全使用規(guī)范
- 幼兒園食品安全健康教育活動方案及總結(jié)
- 生產(chǎn)安全事故應(yīng)急預(yù)案管理辦法培訓(xùn)
- 安全生產(chǎn)許可證的辦理?xiàng)l件
- 中國煤礦安全生產(chǎn)網(wǎng)官網(wǎng)
- 技術(shù)部安全生產(chǎn)責(zé)任制
- 學(xué)校安全生產(chǎn)工作方案
- 老年人慢性病管理方案
- 2023《廣東省建設(shè)工程消防設(shè)計(jì)審查疑難問題解析》
- 2025-2030年中國電力檢測行業(yè)市場發(fā)展態(tài)勢及未來趨勢研判報告
- AI智能在小學(xué)音樂課堂中的應(yīng)用研究
- 智能制造全過程造價咨詢服務(wù)方案
- UL489標(biāo)準(zhǔn)中文版-2019斷路器UL標(biāo)準(zhǔn)中文版
- 鐵路運(yùn)輸市場營銷作業(yè)指導(dǎo)書
- 新能源汽車技術(shù) SL03維修手冊(第4章)-電氣-4.2.2~4.2.12電器集成
- 《安全生產(chǎn)培訓(xùn)機(jī)構(gòu)基本條件AQ 8011-2023》知識培訓(xùn)
- 《鍛造技術(shù)培訓(xùn)》課件
- 《冷干機(jī)原理及維修》課件
評論
0/150
提交評論