VB HW 5 - interest As Single p = CSng(txtbox1.Text r =...

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

View Full Document Right Arrow Icon
Tyler Fox IE 148 VB HomeWork #1 Option Strict On Public Class Form1 Private Sub Button1_Click( ByVal sender As System. Object , ByVal e As System. EventArgs ) Handles Button1.Click If CSng (txtbox1.Text) < 0 Then MsgBox( "Bad Data" ) End If If CSng (TxtBox2.Text) < 0 Then MsgBox( "Bad Data" ) End If If CSng (TxtBox3.Text) < 0 Then MsgBox( "Bad Data" ) End If Dim p, r, n As Single Dim payment As Single Dim
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: interest As Single p = CSng (txtbox1.Text) r = ( CSng (TxtBox2.Text) / 1200) n = CSng (TxtBox3.Text) payment = CSng ((p * r) / (1 - (1 + r) ^ (-n))) interest = n * payment - p TxtBox4.Text = FormatCurrency(payment) TxtBox5.Text = FormatCurrency(interest) End Sub End Class Tyler Fox IE 148 VB HomeWork #1...
View Full Document

This note was uploaded on 08/18/2011 for the course IE 148 taught by Professor Davesly during the Spring '11 term at Iowa State.

Page1 / 2

VB HW 5 - interest As Single p = CSng(txtbox1.Text r =...

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