1. Determine whether a number is Positive/Negative/Zero number.
• If TextBox1.Text < 0 Then TextBox2.Text = “Negative" • If TextBox1.Text = 0 Then TextBox2.Text = “Zero"• If TextBox1.Text > 0 Then TextBox2.Text = “Positive"
2. Determine whether a number is...
23 May, 2011
Conversion
1. Convert the length in km (kilometer) to meter/feet/centimeter and vice versa.
• TextBox2.Text = TextBox1.Text * 1000 • TextBox3.Text = (19.68503937 * TextBox1.Text * 1000) / 6• TextBox4.Text = TextBox1.Text * 100000
2. Convert Fahrenheit temperature to Celsius and vice versa.
• TextBox2.Text = (5 * TextBox1.Text - 160) / 9 • TextBox4.Text = (9 * TextBox3.Text + +160) / 5...
Numbers and Basic Arithmetic Operations
1. Calculate the Addition/Subtraction/Multiplication/Division of two numbers.
• TextBox3.Text = TextBox1.Text + +TextBox2.Text • TextBox3.Text = TextBox1.Text - TextBox2.Text• TextBox3.Text = TextBox1.Text * TextBox2.Text• TextBox3.Text = TextBox1.Text / TextBox2.Text
2. ...
02 May, 2011
Output Tracing
Output Tracing:
Dim i As Integer = 15Dim j As Integer = 10Dim k As Integer
Do While j < i i = i + 1 j += 2 k += i + jLoop
TextBox1.Text = iTextBox2.Text = jTextBox3.Text = k
i j k
(before loop) 15 10 0
10<15: T 16 12 0+16+12=28
12<16: T 17 14 28+17+14=59
14<17: T 18 16 59+18+16=93
16<18:...