范文无忧网计划总结报告汇报

程序设计VB实验

01月09日 编辑 fanwen51.com

[粗盐的提纯化学实验操作方法和实验报告doc PPT]器材:铁架台 漏斗 粗盐水 滤纸 玻璃棒 烧杯 过程:将漏斗在铁架台上装定好 再将滤纸折成三层式用少许清水润湿放入漏斗里 将烧杯放在漏斗下准备接过滤好的盐水 用玻璃棒引流将...+阅读

Option Explicit Function Prime(N As Integer) As Boolean Dim I As Integer If N < 2 Then Prime = False: Exit Function For I = 2 To N - 1 If N Mod I = 0 Then Prime = False: Exit Function Next Prime = True

End Function Private Sub Form_Load() Dim X(1 To 80) As Integer, A() As Integer, B() As Integer Dim J As Integer, I As Integer, T As Integer, N As Integer Dim strT As String * 5, Txt As String For I = 1 To 80 X(I) = Int((99 - 10 + 1) * Rnd + 10) strT = CStr(X(I)) Txt = Txt & strT N = N + 1 If N Mod 10 = 0 Then Txt = Txt & vbCrLf Next N = 0 J = 0 For I = 1 To 80 If X(I) Mod 2 <> 0 Then J = J + 1 ReDim Preserve B(J) B(J) = X(I) End If Next

For I = 1 To UBound(B) For J = I + 1 To UBound(B) If B(I) > B(J) Then T = B(I): B(I) = B(J): B(J) = T End If Next Next Txt = Txt & vbCrLf & vbCrLf &; "奇数" & vbCrLf For I = 1 To UBound(B) strT = CStr(B(I)) Txt = Txt & strT If I Mod 10 = 0 Then Txt = Txt & vbCrLf Next

Txt = Txt & vbCrLf & vbCrLf &; "素数" & vbCrLf N = 0 Dim S As Integer For I = 1 To 80 If Prime(X(I)) Then S = S + X(I) strT = CStr(X(I)) Txt = Txt & strT N = N + 1 If N Mod 10 = 0 Then Txt = Txt & vbCrLf End If Next Text1.Text = Txt End Sub

"搜狗问问"

延伸阅读:

实验室认可整改报告怎么写实验室认可监督评审整改计划 整改单位: 编 制: 审 核: 批 准: 二〇一一年XX月XX日 实验室认可监督评审整改计划 2011年XX月XX至XX日,国家认可委委派实验室认可监督评审组,按照相关...

java小程序设计设计一个窗口程序import java.awt.*; import java.awt.event.*; import javax.swing.*; public class FrameTest { private JFrame jf; private JButton yellow,blue,green; private JPanel...

汇编语言程序设计1、用减奇数法开平方。(算法:N个自然数中的奇数之和等于N的平方。) 程序清单:内存datum中存要开方数 ,result中存放结果 data segment datum db 16 result db 0 data ends ss_seg...

汇编语言程序设计红旗慢慢升起code segment assume cs:code start: push cs pop ds mov ax,12h int 10h mov ax,0a000h mov es,ax mov ah,2;画旗杆 call color mov di,510 mov ax,0aeh mov cx,450 n1:stos...

VB选择循环和数组综合程序设计实验报告Private Sub Form_Click() Dim r(1 To 60) As Integer Dim e(1 To 60) As Integer Dim o(1 To 60) As Integer Dim ec As Integer, oc As Integer Dim i As Integer, j As I...

求大神帮忙做一下这个大学VB程序设计实验报告Private Sub Command1_Click() Dim a As Integer, b As String, i As Integer, c() As String a = Len(Text1.Text) Print a ReDim c(a) As String For i = 1 To a b = Mid(...

VB程序设计实验报告1.实验名称 实验二 Visual Basic基本语句 2.实验目的 (1)掌握Visual Basic的数据类型和变量定义方法。 (2)正确使用Visual Basic的运算符和表达式。 (3)掌握Visual Basic中...

VB程序设计实验报告过程与函数求高手出手急用的我要'计算两个数的和和积 Option Explicit Dim x As Double Dim y As Double Private Sub Cmd1_Click() x = InputBox("请输入一个数:", , 0#) y = InputBox("请再输入一个数:", , 0#) Text1.T...

vb实验程序设计dim iMax as Single,iMin as Single,iSum as Single dim i as integer private sub Command1_click() iSum=0 for i=0 to 9 isum=isum+val(text1(i).text) if iMax<val(text...

推荐阅读
图文推荐
栏目列表