Document 15
Document 15
Area of a triangle
1) Step 1: Start by creating 4 variables of type integer for the input of 2 Numbers called iNum1 and
iNum2 and 2 output variables called iSubtraction and iMultiplication.
Step 2 : Provide code for iSubtraction by which the 2 input variables are extracted from there
corresponding edit boxes and thereafter follow the following mathematical operation iNum1-iNum2.
The answer that is outputed will be saved in the iSubtraction variable.
Step 3 : Provide code for iMultiplication by which the 2 input variables are extracted from there
corresponding edit boxes and thereafter follow the following mathematical operation iNum1*iNum2.
The answer that is outputed will be saved in the iMultiplication variable.
Step 4: End by displaying the output variables in their respective rich edit text boxes.
Step 1: Start by creating 3 variables of input for the base and height of the triangle and of output for the
area of the triangle. Save them in the respective variables iBase, iHeight and iArea of type integer.
Step 2: Extract each value from there respective variables and input them in the sequence
1/2*iBase*iHeight.
Step 3:The result of the above step will be saved in the variable iArea.
Step 4: End by displaying the iArea output variable in it's respective edit box.
Flow chart
Start
Num1-Num2 End
iSubtraction