Site icon TestingDocs.com

Convert Mass to Weight Flowchart

Overview

In this tutorial, we will design a Flowgorithm flowchart to convert mass to weight. We will first design a simple flowchart and then improvise with some conditions.

Formula

The formula to calculate weight is as follows:

Weight = Mass * g

where g is the gravity on Earth = 9.81 m/s^2

Weight = Mass * 9.81 Newtons

Pseudocode

START
DECLARE Real mass, weight

DISPLAY “Please enter the mass of the object (Kgs)=”
INPUT mass
SET weight = mass * 9.81
DISPLAY “The weight of the object on Earth in Newtons =”, weight
END

Sample Flowchart

The flowchart prompts the user for the input: Mass in Kilograms

 

Output

Sample flowchart output is as follows:

 

Let’s modify the flowchart to only display the weight if it’s in the range of [10,1000]. If the weight is < 10 then display that the object is too light. If the weight of the object is > 1000 newtons display that the weight of the object is too heavy.

Solution:

We can add two nested IF statements and specify the conditions in the IF statements.

The first IF statement checks if the weight is > 1000 newtons. If the condition is True then it displays the output statement that the object is too heavy.

If the weight is not greater than 1000 then the inner IF statement is evaluated. If the weight is < 10 then the flowchart prints the message that the object is too light. If the condition is not true then the weight is in the range [10,1000] the flowchart prints the calculated weight of the object.

 

Flowgorithm Tutorials

Flowgorithm flowchart tutorials on this website:

https://www.testingdocs.com/flowgorithm-flowchart-tutorial/

For more updates please like our Facebook page:

Exit mobile version