home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frm3_6_4
- Caption = "3-6-4"
- ClientHeight = 1890
- ClientLeft = 1095
- ClientTop = 1485
- ClientWidth = 2295
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1890
- ScaleWidth = 2295
- Begin VB.PictureBox picResult
- Height = 495
- Left = 120
- ScaleHeight = 435
- ScaleWidth = 1995
- TabIndex = 5
- Top = 1320
- Width = 2055
- End
- Begin VB.CommandButton cmdDivide
- Caption = "Do Long Division"
- Height = 375
- Left = 120
- TabIndex = 4
- Top = 840
- Width = 2055
- End
- Begin VB.TextBox txtDividend
- Height = 285
- Left = 960
- TabIndex = 3
- Top = 480
- Width = 1215
- End
- Begin VB.TextBox txtDivisor
- Height = 285
- Left = 960
- TabIndex = 1
- Top = 120
- Width = 1215
- End
- Begin VB.Label lblDividend
- Caption = "Dividend:"
- Height = 255
- Left = 120
- TabIndex = 2
- Top = 480
- Width = 855
- End
- Begin VB.Label lblDivisor
- Caption = "Divisor:"
- Height = 255
- Left = 240
- TabIndex = 0
- Top = 120
- Width = 735
- End
- Attribute VB_Name = "frm3_6_4"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdDivide_Click()
- Dim divisor As Single, dividend As Single
- Dim quotient As Single, remainder As Single
- 'Long division
- picResult.Cls
- divisor = Val(txtDivisor.Text)
- dividend = Val(txtDividend.Text)
- quotient = Int(dividend / divisor)
- remainder = dividend - Int(dividend / divisor) * divisor
- picResult.Print "The quotient is"; quotient
- picResult.Print "The remainder is"; remainder
- End Sub
-