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

Raptor Flowchart

Number Positive or Negative flowchart

Raptor Flowcharts

Introduction

In this post, we will learn how to design a flowchart to decide if the user entered number is negative or positive. The flowchart uses the Selection symbol. A selection-control symbol allows you to make decisions in the flowchart.

Basic Mathematics

n < 0  n is negative.

If the given number is less than 0 -> the number is negative.

n > 0 n is positive.

If the number is > 0 the number is positive.

Zero is a special case.

 

Number positive or negative

Create RAPTOR flowchart:

Launch the RAPTOR flowchart tool.
We need a variable to hold the user entered number.
Let us call it n.

 

 

Drag and drop the Assignment symbol.

n <- 0

Input Symbol

Drag and drop one Input symbol for the user prompt.

https://www.testingdocs.com/raptor-flowchart-basics-input-and-output/

 

 

Selection Symbol

Now we need one Selection symbol. Drag and drop the selection symbol.

Double click on the diamond box n < 0

https://www.testingdocs.com/questions/how-to-use-selection-symbol-in-raptor-flowchart/

 

 

 

Output Symbol

Drop two Output symbols in the Yes path flow and the other in the No path flow.

 

 

In the Yes path output the number is negative.

 

 

In the No path add another selection to decide zero or positive.

 

 

Execute and Test the flowchart.

Flowchart run output

Execute the RAPTOR flowchart.

Example Output

Print the number if its positive or negative number.
For example:
Input: 56

Output : 56 is a positive number.

Input : -45

Output : -45 is a negative number.

This is similar to what we do in programming code using the if-then statements to make decisions. We can execute the if-then flow using the selection symbol in the Raptor flowchart.

—

RAPTOR Tutorials

RAPTOR tutorial page: https://www.testingdocs.com/raptor-a-flowchart-tool/

Flowchart examples: https://www.testingdocs.com/raptor-flowchart-examples/

RAPTOR official website: https://raptor.martincarlisle.com/

Related Posts

Install RAPTOR Avalonia CentOS

Raptor Flowchart /

Install RAPTOR Avalonia on CentOS

RAPTOR Avalonia Edition Windows

Raptor Flowchart /

Download RAPTOR Avalonia Edition on Windows

RAPTOR Editions

Raptor Flowchart /

RAPTOR Editions

RAPTOR flowcart to write to a file output

Raptor Flowchart /

Write to a file with RAPTOR flowchart

Sum of Squares Array Elements Modular Approach

Raptor Flowchart /

Sum of Squares of Given Array Elements

‹ Sequential program control in Flowcharts› Adding Accessor and Mutator in Raptor flowchart

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