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

Flowgorithm

Calculate Triangle Area Flowgorithm Example

Overview

In this tutorial, we will learn to design a flowchart to calculate the triangle area. This Flowgorithm Example uses the below Flowgorithm flowchart symbols:

  • Declare
  • Assign
  • Input
  • Output
  • Comment

To know more about Flowgorithm flowchart symbols:

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

Mathematical Formula

Given the base of the triangle and the height of the triangle,

We can calculate the triangle area as follows:

Triangle Area = 1/2*base*height

Program Development

Let’s declare two variables to hold the input values the triangle base and the height of the triangle.

  • base
  • height

We will compute the area of the triangle. Let’s declare another variable called area to hold the computed value of the area of the triangle.

 

CArea Declare Variable

The Declare flowchart symbols are used to declare the variables in the flowchart. The data types of the three variables are of the type Real.

We will prompt the user to enter the values of the input variables. We use the output flowchart symbols to prompt the user to enter the values of the triangle base and height.

 

CArea User Prompt Flowgorithm

The area computation is done using an Assign flowchart symbol.

Flowgorithm Flowchart

The flowchart to calculate the triangle area given the base and height is as follows:

 

Flowgorithm Example Calculate TriangleArea

 

Sample Output

Let’s run the flowchart and verify the output.

Area of Triangle Flowchart Output Flowgorithm

That’s it. We have created a simple Flowgorithm flowchart to calculate the area of the triangle.

—

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 Program Menu› Flowgorithm Pass By Value Example

Recent Posts

  • MS Access Data Types
  • 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

Go to mobile version