Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub btncalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btbcalculate.Click
- Dim width As Double
- Dim height As Double
- width = Double.Parse(txtboxWidth.Text)
- height = Double.Parse(txtboxHeight.Text)
- Dim widthI As Integer
- Dim heightI As Integer
- widthI = Math.Ceiling(width)
- heightI = Math.Ceiling(height)
- lblHeight.Text = heightI
- lblWidth.Text = widthI
- Dim rolls As Integer
- Dim rolls2 As Integer
- ' adding rolls of curtains
- Do While widthI > 0
- widthI = widthI - 5
- rolls = rolls + 1
- Loop
- Do While heightI > 0
- heightI = heightI - 3
- rolls2 = rolls2 + 1
- Loop
- 'end of loop for rolls of curtains
- If rolls2 > rolls Then
- rolls = rolls2
- End If
- ' rolls is number of rolls
- lblRolls.Text = rolls
- ' these are definitely wrong
- lblHeight2.Text = (lblRolls.Text - lblHeight.Text)
- lblWidth2.Text = (lblRolls.Text - lblWidth.Text)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement