




已閱讀5頁,還剩1頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quá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第二卷計算結(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)換 十進制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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 海洋氣象觀測數(shù)據(jù)的質(zhì)量控制與保障考核試卷
- 罐頭食品企業(yè)環(huán)境保護與綠色生產(chǎn)考核試卷
- 煤炭市場結(jié)構(gòu)優(yōu)化與產(chǎn)業(yè)發(fā)展考核試卷
- 煤炭洗選工藝設(shè)計與實踐考核試卷
- 吉林省遼源市第五中學(xué)2024-2025學(xué)年高三下期末質(zhì)量檢查生物試題理試題含解析
- 山東省樂陵市花園鎮(zhèn)達標名校2025屆初三實驗班第一次質(zhì)檢數(shù)學(xué)試題試卷含解析
- 江蘇省淮安市洪澤縣2024-2025學(xué)年初三下學(xué)期第二次模擬考試語文試題試卷含解析
- 內(nèi)蒙古呼和浩特市2024-2025學(xué)年高三第二學(xué)期期終學(xué)習(xí)質(zhì)量調(diào)研測試歷史試題含解析
- 吉林省長春市榆樹市2024-2025學(xué)年高三第五次模擬考試數(shù)學(xué)試題試卷含解析
- 西藏拉薩市墨竹工卡縣2025屆小升初全真模擬數(shù)學(xué)檢測卷含解析
- 乒乓球社團活動記錄
- 新時代中小學(xué)教師職業(yè)行為十項準則考核試題及答案
- 數(shù)據(jù)結(jié)構(gòu)-第6章-圖課件
- 《變態(tài)心理學(xué)與健康心理學(xué)》考試復(fù)習(xí)題庫150題(含答案)
- DB15T 489-2019 石油化學(xué)工業(yè)建設(shè)工程技術(shù)資料管理規(guī)范
- 保潔服務(wù)崗位檢查考核評分標準
- 皮內(nèi)針講課課件
- 幼兒園繪本:《小蛇散步》 課件
- 村衛(wèi)生室靜脈輸液準入申請審批表
- 提高鋼柱安裝垂直度合格率QC成果PPT
- 計算機網(wǎng)絡(luò)故障的診斷與解決方法論文
評論
0/150
提交評論