Site icon TestingDocs.com

Division of Two numbers Raptor Flowchart

Overview

In this tutorial, we will model a Raptor flowchart to compute the division of two numbers. The flowchart should prompt the user for the two numbers. The result of the division should be stored in a variable called an answer. The answer should be displayed as the result of the division of the two numbers to the user.

Take into consideration

Sanitize the user input accordingly in the flowchart. Take into consideration any abnormal conditions during the computations. Invalid inputs can be strings, blank input, etc. We cannot divide two strings of data mathematically. It’s a good idea to inform the user about the invalid inputs and errors in the flowchart.

Flowchart

 

Sample Output

Testcase 1

Operand 1 entered := 9
Operand 2 entered := 3
Product of the two numbers (9/3) :=3

TestCase 2

Operand 1 entered := 10
Operand 2 entered := 0
Operand 2 cannot be zero.

Runtime Error

An abnormal condition occurs when we divide or try to divide any number with 0. The result would be infinity. We would encounter a “Can’t divide by zero” runtime flowchart error. We need to gracefully handle this condition in the flowchart.

Non-graceful Raptor error dialog box abruptly displayed when the second number is zero.

 

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