Старые отчёты / ФЫР / информатика!!!!!!!!! / Private sub command1
.doc111
№1
Private sub command1_click( )
Dim V as single, a as single, L as single, betta as single
a = Inputbox(“a=”)
L = Inputbox(“L=”)
Betta=Inputbox(“betta=”)
V = a^3*sin(2*L)*sin(betta)*cos(L)/(4*sqr(cos(L+betta)*cos(L – betta)))
Msgbox “V=” & V
End sub
№2
Private sub command1_click( )
Dim V as single, a as single, L as single, betta as single
a = Val(Text1.text)
L = Val(Text2.text)
betta = Val(Text3.text)
V = a^3*sin(2*L)*sin(betta)*cos(L)/(4*sqr(cos(L+betta)*cos(L – betta)))
Text4.text Str (V)
End sub
222
#1
Private sub command1_click( )
Const pi as single = 3.14
Dim x as single, F as single
x = Inputbox(“x=”)
If x<0 then
F = sin(x)
Elseif x>pi/2 then
F=cos(x)
Else
F=0
End if
Msgbox “F=”& F
End sub
#2
Private sub command1_click( )
Dim r as single, m as single, Y1 as single, Y2 as single
r = text1
a = text2.text
m=r^2
If m >3.5 then
Y1=1-0.5*a
Y2=a
Else
Y1=text3.text:Y2=text4.text
End if
Msgbox “Y1=”&Y1&”Y2”&Y2
End sub
