IE 148 Lab 5

IE 148 Lab 5 - lstAnswer.Items.Add"The Metric length...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Morgan Hampel Tyler Fox IE 148 Lab 5 Professor Sly Option Strict On Public Class Form1 Private Sub btnConv_Click( ByVal sender As Object , ByVal e As System. EventArgs ) Handles btnConv.Click Dim miles As Single , yards As Single , feet As Single , inches As Single , kilometers As Single , totcentimeters As Single , totinches As Single Dim totmeters, meters, meters1, kilometers1 As Single miles = CSng (txtMiles.Text) yards = CSng (txtYards.Text) feet = CSng (txtFeet.Text) inches = CSng (txtInches.Text) totinches = (miles * 63360) + (36 * yards) + (12 * feet) + inches totmeters = totinches / CSng (39.37) kilometers = Int(totmeters / 1000) kilometers1 = (totmeters / 1000) meters = (kilometers1 - kilometers) * 1000 meters1 = (Int(meters)) totcentimeters = (meters - meters1) * 100 Dim Themetriclengthis As String = CStr ( "The metric length is"
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ) lstAnswer.Items.Add( "The Metric length is" ) lstAnswer.Items.Add(kilometers & " kilometers" ) lstAnswer.Items.Add(meters1 & " meters" ) lstAnswer.Items.Add(FormatNumber(totcentimeters, 2) & " centimeters" ) End Sub End Class Morgan Hampel Tyler Fox IE 148 Lab 5 Professor Sly Public Class Form1 Dim x As Single = CSng (txtParts.Text), b As Single = CSng (txtMgC.Text), c As Single = CSng (txtFixedcost.Text), a As Single = CSng (txtDPP.Text) Private Sub btnPLE_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPLE.Click Select Case (x * a) - (b * x + c) Case Is > 0 MsgBox( "PROFIT" ) Case Is < 0 MsgBox( "LOSS" ) Case MsgBox( "BREAK EVEN" ) End Select End Sub End Class...
View Full Document

Page1 / 2

IE 148 Lab 5 - lstAnswer.Items.Add"The Metric length...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online