0% found this document useful (0 votes)
3 views2 pages

Document 15

The document outlines algorithms and flowcharts for two mathematical operations: subtracting and multiplying two numbers, and calculating the area of a triangle. It details the steps for creating input and output variables, performing the necessary calculations, and displaying the results. Additionally, it includes a flowchart representation for the subtraction and multiplication process.

Uploaded by

shivaal.s56
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Document 15

The document outlines algorithms and flowcharts for two mathematical operations: subtracting and multiplying two numbers, and calculating the area of a triangle. It details the steps for creating input and output variables, performing the necessary calculations, and displaying the results. Additionally, it includes a flowchart representation for the subtraction and multiplication process.

Uploaded by

shivaal.s56
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

CMIN101 Home work

Write an algorithm and flowchart for:

Subtracting 2 number and Multiplying 2 numbers in a same algorithm.

Write an algorithm and flowchart for:

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.

2) Algorithm for Area of a Triangle.

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

iNum1 & iMultiplication


iNum1*iNum2
iNum2

Num1-Num2 End
iSubtraction

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy