Site icon TestingDocs.com

How to find square root of a number in Raptor Flowchart?

Overview

In this post, we will design a flowchart to find the square root of a number. We can use the Raptor inbuilt function sqrt() to calculate the square root.

We will validate the user input in this flowchart to accept only numbers. We will prompt the user to try again until the user enters a valid number.

Sample Test cases:

Valid Input: 25

Valid Input: 42.7

Invalid input: adcd

Invalid input:  John

Flowchart

The main flowchart invokes the below GetValidInput() procedure.

In case, if the user enters invalid input, the procedure will display an error and prompts the user to try again. This will repeat until the user enters valid number data.

Sample Output

 

User Input =abcd
Error : Enter valid input. Please try again.
User Input =John
Error : Enter valid input. Please try again.
User Input =42.7000
Square root of the number 42.7000 is = 6.5345

 

Raptor Tutorials on this website can be found at:

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

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

Exit mobile version