TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Flowgorithm

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

 

Convert Mass to Weight

Output

Sample flowchart output is as follows:

Mass to Weight Flowchart Output

 

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.

 

Nested If Statements Mass to Weight

—

Flowgorithm Tutorials

Flowgorithm flowchart tutorials on this website:

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

Flowgorithm Website

For more information on the Flowgorithm tool, please visit the official website at:

http://flowgorithm.org/

Related Posts

Print Triangle Pattern Flowchart

Flowgorithm /

Print Triangle Pattern Flowchart

Flowgorithm Breakpoint Symbol

Flowgorithm /

Flowgorithm Conditional Breakpoint Statement

File Read Declare Variables

Flowgorithm /

Flowgorithm Read Numbers from File Example

File Search Input File Flowgorithm

Flowgorithm /

Search Text File Flowchart Example

Flowgorithm Turtle Graphics Symbols

Flowgorithm /

Flowgorithm Turtle Graphics Symbols

‹ Flowgorithm Logical Operators› Flowgorithm Constants

Recent Posts

  • Update draw.io on Windows
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com