سورس های ویژوال بیسیک-ماشین حساب

این سورس برنامه هستش برای دانلود نسخه اجرایی با ایمیلم تماس بگیرید

Private Sub Command1_Click()

Dim a As Integer
Dim b As Integer
a = InputBox("paye ra vared konid")
b = InputBox("tavan ra vared konid")
 If a = 1 Then MsgBox ("in adad tavan pazir nist javab hamishe 1 ast")
 If a = 0 Then MsgBox ("khata: paye nemitavanad sefr bashad")
 If b = 0 Then MsgBox ("1")
  If b = 1 Then MsgBox a
 
   If a > 1 Then MsgBox a ^ b
   

  End Sub

Private Sub Command10_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
a = InputBox("Tool ra vared konid")
b = InputBox("Arz ra vared konid")
 If a > 0 And b > 0 Then MsgBox 2 * (a + b) Else MsgBox ("khata:tool ya arz ra eshtebah vared kardid")
 
   
End Sub

Private Sub Command11_Click()
Dim a As Integer
Dim b As Integer
a = InputBox("Tool ra vared konid")
b = InputBox("Arz ra vared konid")
 If a > 0 And b > 0 Then MsgBox a * b Else MsgBox ("khata:tool ya arz ra eshtebah vared kardid")
 
 
End Sub

Private Sub Command12_Click()
MsgBox ("Masahat=Tool × Arz")

End Sub

Private Sub Command13_Click()
MsgBox ("Masahat=(Ghaede×Ertefa)÷2")

End Sub

Private Sub Command14_Click()
MsgBox ("Masahat=3/14×shoae dayere ^2")

End Sub

Private Sub Command15_Click()
MsgBox ("Mohit=(Tool+Arz)×2")

End Sub

Private Sub Command16_Click()
MsgBox ("Mohit=Majmoee 3 zele mosalas")


End Sub

Private Sub Command17_Click()
MsgBox ("Mohit=3/14 × Ghotr")

End Sub

Private Sub Command18_Click()
MsgBox ("Masahat=4×(3.14)×shoa, ^2")


End Sub

Private Sub Command19_Click()
MsgBox ("Hajm=(4/3)×3.14×shoa, ^3")

End Sub

Private Sub Command2_Click()
Dim a As Integer
Dim b As Integer
a = InputBox("adade aval ra vared konid")
b = InputBox("adade dovom ra vared konid")
If a = 0 Then Beep
If b = 0 Then Beep
 MsgBox a + b
 
 End Sub

Private Sub Command20_Click()
Dim a As Integer
a = InputBox("shoa, ra vared konid")
 If a > 0 Then MsgBox (4 / 3) * 3.14 * a ^ 3 Else MsgBox ("shoa, ra eshtebah vared kardeiid")
 
End Sub

Private Sub Command21_Click()
Dim a As Integer
a = InputBox("shoa, ra vared konid")
 If a > 0 Then MsgBox 4 * 3.14 * a ^ 2 Else MsgBox ("shoa, ra eshtebah vared kardeiid")
 
End Sub

Private Sub Command24_Click()

End Sub

Private Sub Command26_Click()
a = InputBox("Enter a number")
b = Sqr(a)
MsgBox b

End Sub

Private Sub Command27_Click()

    For n = 2 To 100
        c = 0
        For i = 1 To n
                b = n Mod i
                If b = 0 Then c = c + 1
        Next
        If c = 2 Then Print n
     Next
End Sub

Private Sub Command28_Click()
    Dim a As Integer
    Dim b As Integer
    Dim c As Integer
    a = InputBox("Enter a")
    b = InputBox("Enter b")
    c = InputBox("Enter c")
        delta = b ^ 2 - 4 * a * c
    If delta < 0 Then
          MsgBox ("haven't root")
    Else
          X1 = (-b + Sqr(delta)) / 2 * a
          X2 = (-b - Sqr(delta)) / 2 * a
          Print "X1=", X1, "X2=", X2
        End If
        
              
        
End Sub

Private Sub Command29_Click()
    Dim n As Double
    n = InputBox("Enter a Number")
    S = 1
        For i = 1 To n
        S = S * i
        Next
        MsgBox S

End Sub

Private Sub Command3_Click()
Dim a As Integer
Dim b As Integer
a = InputBox("adade aval ra vared konid")
b = InputBox("adade dovom ra vared konid")
If a = 0 Then Beep
If b = 0 Then Beep
 MsgBox a - b
End Sub

Private Sub Command30_Click()
    MsgBox ("Mahan Hr" & vbCrLf & "mahan@metalfan.com" & vbCrLf & "maxblog.persianblog.ir")
   
End Sub

Private Sub Command4_Click()
Dim a As Integer
Dim b As Integer
a = InputBox("adade aval ra vared konid")
b = InputBox("adade dovom ra vared konid")
If a = 0 Then MsgBox ("khata") And Beep
If b = 0 Then MsgBox ("khata") And Beep

 For c = 1 To 1
  MsgBox a * b
     
 Next
 
End Sub

Private Sub Command5_Click()
Dim a As Integer
Dim b As Integer
a = InputBox("adade aval ra vared konid")
b = InputBox("adade dovom ra vared konid")
If a > 0 Then MsgBox a / b

End Sub

Private Sub Command6_Click()
Dim a As Integer
a = InputBox("Ghotr ra vared konid")

 If a > 0 Then MsgBox 3.14 * a Else MsgBox ("ghotr ra eshtebah vared kardeiid")
 
End Sub

Private Sub Command7_Click()
Dim a As Integer
Dim b As Integer
a = InputBox("shoa, ra vared konid")
 If a > 0 Then MsgBox 3.14 * a ^ 2 Else MsgBox ("shoa, ra eshtebah vared kardeiid")
 
 
    
 End Sub

Private Sub Command8_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer
a = InputBox("Zele aval ra vared konid")
b = InputBox("Zele dovom ra vared konid")
c = InputBox("Zele sevom ra vared konid")
 If a > 0 And b > 0 And c > 0 Then MsgBox a + b + c Else MsgBox ("yeki az adad ha ghabele ghabool nis")

End Sub

Private Sub Command9_Click()
Dim a As Integer
Dim b As Integer
a = InputBox("Ertefa ra vared konid")
b = InputBox("Ghaede ra vared konid")
 If a > 0 And b > 0 Then MsgBox (a * b) / 2 Else: MsgBox ("yeki az adad ghabele ghabool nist")
 
End Sub

Private Sub Label3_Click()

End Sub

/ 1 نظر / 49 بازدید

عالیه