23 May, 2011

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.            Calculate the Average of three numbers.

 TextBox4.Text = (TextBox1.Text + +TextBox2.Text + +TextBox3.Text) / 3


3.            Calculate the Percentage of one number to another number (for example, 35 is 70% of 50)


TextBox3.Text = TextBox1.Text * TextBox2.Text / 100


4.            Calculate the Area of a rectangle/square/triangle/circle.

• TextBox3.Text = TextBox1.Text * TextBox2.Text
• TextBox2.Text = TextBox1.Text * TextBox1.Text
• TextBox3.Text = 0.5 * TextBox1.Text * TextBox2.Text
• TextBox2.Text = 3.1416 * (TextBox1.Text * TextBox1.Text)


5.            Calculate the Price of an item after 30% discount.

TextBox2.Text = TextBox1.Text - (TextBox1.Text * 0.3)


6.            Calculate the Amount of Simple Interest from principal amount, annual rate and time.


TextBox4.Text = TextBox1.Text * TextBox2.Text * TextBox3.Text * (1 / 1200)

0 comments:

Post a Comment