Site icon TestingDocs.com

Square of given number using RAPTOR flowchart

Introduction

In this tutorial, we will create a RAPTOR flowchart to find the square of a given number using the RAPTOR tool. Let the flowchart prompt the user for the number. Calculate the square of the number and output the result to the console.

We use the Exponentiation operator in RAPTOR. There are two operators for the exponentiation.

^ and **

To find the square of a number we can use this operator.

Example: Different ways to compute the square of a number.

result <- 5 ^ 2

result <- 5 ** 2

result <- 5*5

Pseudo Code

START

DECLARE result,n

INPUT n

result <- n^2

OUTPUT result

END

Flowchart

Sample Output:

 

RAPTOR Tutorial

Raptor Tutorials on this website can be found at:

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

Exit mobile version