Computers

The Square Root of a Number Raptor Flowchart

The Square Root of a Number Raptor Flowchart

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

Raptor Flowchart

The main flowchart invokes the below GetValidInput() procedure.

square root of number flowchart

If the user enters invalid input, the procedure will display an error and prompt the user to try again. This will repeat until the user enters valid number data.

Sample Output

square root 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

 

To find the square root of a number without using any function:

RAPTOR Tutorials

Raptor Tutorials on this website can be found at: