求几个vb编程,高手请进
Private Sub Form_Click()
Dim i As Integer
Dim j As Integer
j = 0
For i = 2001 To 1 Step -1
j = j + 1
If j = 10 Then
Print Chr(10) + Chr(13); i,
j = 0
Else
Print i,
End If
Next
End Sub
Private Sub Form_Load()
Form1.WindowState = 2
End Sub
函数
由基本函数导出之公式
Secant(正割)
Sec(X) = 1 / Cos(X)
Cosecant(余割)
Cosec(X) = 1 / Sin(X)
Cotangent(余切)
Cotan(X) = 1 / Tan(X)
Inverse Sine
(反正弦)
Arcsin(X) = Atn(X / Sqr(-X * X + 1))
Inverse Cosine
(反余弦)
Arccos(X) = Atn(-X / Sqr(-X * X + 1)) + 2 * Atn(1)
Inverse Secant
(反正割)
Arcsec(X) = Atn(X / Sqr(X * X - 1)) + Sgn((X) - 1) * (2 * Atn(1))
Inverse Cosecant
(反余割)
Arccosec(X) = Atn(X / Sqr(X * X - 1)) + (Sgn(X) - 1) * (2 * Atn(1))
Inverse Cotangent
(反余切)
Arccotan(X) = Atn(X) + 2 * Atn(1)
Hyperbolic Sine
(双曲正弦)
HSin(X) = (Exp(X) - Exp(-X)) / 2
Hyperbolic Cosine
(双曲余弦)
HCos(X) = (Exp(X) + Exp(-X)) / 2
Hyperbolic Tangent
(双曲正切)
HTan(X) = (Exp(X) - Exp(-X)) / (Exp(X) + Exp(-X))
Hyperbolic Secant
(双曲正割)
HSec(X) = 2 / (Exp(X) + Exp(-X))
Hyperbolic Cosecant(双曲余割)
HCosec(X) = 2 / (Exp(X) - Exp(-X))
Hyperbolic Cotangent(双曲余切)
HCotan(X) = (Exp(X) + Exp(-X)) / (Exp(X) - Exp(-X))
Inverse Hyperbolic Sine(反双曲正弦)
HArcsin(X) = Log(X + Sqr(X * X + 1))
Inverse Hyperbolic Cosine(反双曲余弦)
HArccos(X) = Log(X + Sqr(X * X - 1))
Inverse Hyperbolic Tangent(反双曲正切)
HArctan(X) = Log((1 + X) / (1 - X)) / 2
Inverse Hyperbolic Secant(反双曲正割)
HArcsec(X) = Log((Sqr(-X * X + 1) + 1) / X)
Inverse Hyperbolic Cosecant
HArccosec(X) = Log((Sgn(X) * Sqr(X * X + 1) + 1) / X)
Inverse Hyperbolic Cotangent
(反双曲余切)
HArccotan(X) = Log((X + 1) / (X - 1)) / 2
以 N 为底的对数
LogN(X) = Log(X) / Log(N)
Me.AutoRedraw = True
Cls
For a = 0 To 3
For b = 1 To 5
For c = 0 To 6
If a + b + c = 8 Then
Print "红"; a; "白"; b; "黑"; c
End If
Next c
Next b
Next a
End Sub
Private Sub Command2_Click()
x = Val(InputBox("输入整数"))
y = Val(InputBox("输入次方"))
s = 1
For i = 0 To y - 1
s = (s * x) Mod 1000
Next i
Print s
End Sub
Private Sub Command3_Click()
Me.AutoRedraw = True
Cls
For i = 10 To 99
a = i \ 10
b = i Mod 10
If a + b < a * b Then Print i
Next i
End Sub
用VB进行编程:五位跳水高手将参加十米高台跳水决赛。有好事者让五个人...
15 - (A + B + C + D) 当条件 不合理 用我的代码就好 A说的2个答案只有一个是真的 用or(或) 只要其中一个答案为真 a1就为真 a1 = (b = 2) Or (a = 3)因为5个数都不互相等 所以积120的组成元素是唯一的 不会出现 5+4+3+2+1=15 5+3+3+3+1 也等于15 这样的情况 ...
一道VB编程题
创建3个文本框,第一个输入年,第二个输入月,第三个输入日。用year(now),month(now),day(now)分别返回当前年月日。用year(now)-学生生日即可得到年龄,如果想要准确的周岁生日,再比较月,日就行了。用inputbox也可以 a=inputbox("输入学生生日-年")b=inputbox("输入学生生日-月")c=input...
新手学VB编程 高手进!
下面是一段最小的程序,能实现两个数的相乘:a=2 b=3 c=a*b print a;"*";b;"=";c 第一句:a是一个变量,给它赋值2 说明:(1)变量是一个代号,它好像方程中的x一样能代表不同的数、值。(2)等号(=)是一个赋值符号,它是让等号左边的变量等于右边的值(注意一定是一个有确定值...
...然后list1统计每个数出现次数 vb编程 求高手
Dim a(20) As Integer, n As Integer Text1.Text = ""List1.Clear Randomize For i = 1 To 20 a(i) = Int(Rnd * 90 + 10) '随机生成10到99的整数 Text1.Text = Text1.Text & a(i) & " "If i Mod 10 = 0 Then Text1.Text = Text1.Text & vbCrLf '十个数一行 Next...
关于VB编程,求助高手,高分!!!
你这样不浑杂才怪~~~计算的时候不要打印~~在最后面三个矩阵打印分开写~~也就是三套循环语句~~Private Sub Form_Load()Dim A(4, 4) As Integer, B(4, 4) As Integer, C(4, 4) As Integer, i%, j Randomize For i = 1 To 4 For j = 1 To 4 A(i, j) = Int(Rnd ...
VB编程代码,请尽量用比较简单的代码,原谅我这只菜鸟。。。
Private Sub Command1_Click()Dim strA(9) As String Dim i, s As Long s = 0 For i = 0 To 9 strA(i) = InputBox("请输入第" & i + 1 & "位同学成绩!", "提示:(成绩为大写ABCDE)")If Asc(strA(i)) < 65 Or Asc(strA(i)) > 69 Then MsgBox "输入有误,成绩只限于...
求VB高手!编程输出50——200之间的能被5或11整除的数,每行打印7个数...
include<stdio.h> void main(){ int i,j,sum=0;for(i=50;i<200;i++){ if(i%5|==0||i%11==0){sum+=i;if(((i-50)+1)%7==0)printf("\\n");else printf("%4d",i);} } }
求助,vb编程题。设计一个程序,找出100~900之间的无暇素数
Option ExplicitPrivate Sub Command1_Click() Dim i As Integer, ImmaculacyPrimeNumber As Integer Dim InversionNumber, Counter As Integer For i = 100 To 900 ImmaculacyPrimeNumber = 100 * (i Mod 10) + 10 * (i \\ 10 Mod 10) + i \\ 100 If IsPrimeNumber(i) And IsP...
我想学习VB编程,但是又是新手,希望高手们给点门路!
超级简单 最基本的语句:设置变量值语句“=”。VB编程,就是不断地改变控件的属性。例如:Private Sub Form_Load() '当窗口打开时 Me.Caption = "你好!" '把“Me”(就是这个窗口)的标题改为“你好!”End Sub '程序结束
用vb 编程...(简单的很,可是我不会)
p mod 9=8 and _p mod 8=7 and _p mod 7=6 and _p mod 6=5 and _p mod 5=4 and _p mod 4=3 and _p mod 3=2 and _p mod 2=1 then i=i+1 end if next print i 谁说是QB?说QB也对,因为VB代码与QB本来就是有相当的相通之处。用VB:你新建一个EXE文档,在设计...
龙亲泰方: 题目1:打开程序后显示窗体,窗体上有2个单选按钮,标题分别为关机、重启;另有一个按钮,单击后执行单选按钮的命令. 步骤:在窗体上画两个单选按钮(名称分别为opt1、opt2)和一个按钮(名称为cmd) 代码: Private Sub Form_Load...
黄州区15967026559: 求一个VB编程高手群来帮我!有的回答,谢谢``?
龙亲泰方: 群名:【编程】活跃一群 群号:50167302 创建人:30321106 (编程区正式管理员:睡仙和尚) 此群为问问区活跃人员由正式管理员睡仙和尚邀请加入 所以你应该要在这个区很活跃,这样管理员会主动添加你到这个群里面 我就是这么进去的,所以加油吧!
黄州区15967026559: 急求VB的代码高手进来?
龙亲泰方: 简直简单的和1一样,看代码: Option ExplicitPrivate Sub Command1_Click() On Error GoTo Err Shell App.Path & "\xx.exe", vbNormalFocus Exit Sub Err: MsgBox Err.Description, vbOKOnly, "错误!" End Sub 祝你好运!
黄州区15967026559: 求几个VB编程解答 - ?
龙亲泰方: 第二题:思路:1.输入一个正整数n2.如果n为奇数,I = n+1,否则I = n+2 用i为初值开始循环,每次循环i递增2,这样保证I就是大于n的偶数. 设置变量c = 0,作为计数器,每找到一个满足要求(I...
黄州区15967026559: vb程序,高手请进 急?
龙亲泰方: Private Const fTitle As String = "我向右移动" Private Const MaxSpace As Long = 20 '控制最大位移 Private Sub Form_Click() Beep '单击窗体发声 End Sub Private Sub Form_Load()Timer1.Interval = 100 Timer2.Interval = 150 End Sub Private ...
黄州区15967026559: VB编程共12题,高手请进,做完后有赏分 - ?
龙亲泰方: 唉,帮帮你吧,控件自己画.1) private sub form_load() list1.additem "Item1" list1.additem "Item2" list1.additem "Item3" list1.additem "Item4" end sub private C1_click() text1.text1=text1.text+list1.text+chr(13)+chr(10) end sub2) private Cmd...
黄州区15967026559: VB高手进,跪求?
龙亲泰方: 代码如下: Private Sub Command1_Click() Dim i As Integer For i = 0 To 3 ''循环 Me.Print Space(i) & String(10, "*") & vbCrLf ''''产生i个空格 & 生成10个星号 & 换行 Next i End Sub OVER
黄州区15967026559: 求几个VB程序的代码,谢谢了!?
龙亲泰方: 我的解答在这里 http://wenwen.soso.com/z/q173439010.htm label2 显示成绩 check1(0) check1(1) check1(2) check1(3) 成绩评定,为控件数组 代码: Dim cj As SinglePrivate Sub Command1_Click()Dim s As Strings = InputBox("请输入成绩"...
黄州区15967026559: 求一些VB常用的编程代码~~~ - ?
龙亲泰方: VB实用函数Time 返回系统时钟的当前时间. Date 返回系统时钟的当前日期. Now 返回代表当前日期和时间的编码值.该函数经常用作其它系统时钟函数的参数. Hour(Time) 返回指定时间的小时部分(0到23). Minute(Time) 返回指定时...
黄州区15967026559: vb高手请进!帮编写个程序!急求!?
龙亲泰方: Private Sub Command1_Click() Cls Dim s(1 To 20) As Integer, sum As Long Print "随机20个整数:" For i = 1 To 20 s(i) = Int(Rnd * 100 + 100) n = n & s(i) & "," Next Print n Print "能被7整除的数:" For j = 1 To 20 If s(j) Mod 7 = 0 Then sum = sum + s(j): n1 = n1 & s(j) & "," Next Print n1 Print "能被7整除的数的和为:" & sum End Sub