已閱讀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(“請輸入學號:“)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)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度電子煙具噴漆定制合同
- 2025年度苗木種植基地綠色認證合作合同4篇
- 2025年版城市綠地門衛(wèi)及環(huán)境安全維護合同4篇
- 2025年個人住宅防水工程驗收合同范本2篇
- 二零二五年度棉被產(chǎn)品展示與體驗店合作經(jīng)營合同4篇
- 2025年度個人二手房買賣合同售后服務(wù)與糾紛調(diào)解協(xié)議
- 2025年度個人旅游保險合同范本6篇
- 2025年度民間汽車質(zhì)押借款電子支付合同范本3篇
- 2025年度豪華品牌個人二手車買賣合同范本2篇
- 2025年度擬上公司與會計事務(wù)所財務(wù)信息處理保密合同4篇
- 《白蛇緣起》賞析
- 海洋工程用高性能建筑鋼材的研發(fā)
- 蘇教版2022-2023學年三年級數(shù)學下冊開學摸底考試卷(五)含答案與解析
- 英語48個國際音標課件(單詞帶聲、附有聲國際音標圖)
- GB/T 6892-2023一般工業(yè)用鋁及鋁合金擠壓型材
- 冷庫安全管理制度
- 2023同等學力申碩統(tǒng)考英語考試真題
- 家具安裝工培訓教案優(yōu)質(zhì)資料
- 在雙減政策下小學音樂社團活動有效開展及策略 論文
- envi二次開發(fā)素材包-idl培訓
- 醫(yī)院手術(shù)室醫(yī)院感染管理質(zhì)量督查評分表
評論
0/150
提交評論