TestingDocs.com
Testing Questions
  • Home
  • Automation
    • Selenium
    • TestNG
  • Tutorials
    • MySQL Tutorials
    • TestLink
    • Maven
    • Git
  • Flowcharts
    • Flowgorithm
    • Raptor

RAPTOR Flowcharts

Raptor flowchart to find the number of digits in a number.

Mathematics

Overview

In this post, we will design a Raptor flowchart to find the number of digits in a number. Let’s design a flowchart to accept only good data. In this case, good data is positive numbers.

We will design the flowchart to be intelligent to reject invalid inputs like strings. Furthermore, the flowchart only accepts positive numbers as input.

Sample Inputs

For example Some of the test cases

Input: 6784

Number of digits = 4

Input: 67856

Number of digits = 5

Flowchart

We will design the flowchart as a Raptor procedure that calls itself. The main will invoke this procedure for the first time.

 

Main Flowchart Number of Digits

 

The procedure in the flowchart is recursive and intelligent. It tracks the valid input with a boolean flag.(validFlag) .The boolean variable is initially set to False. If the input data is valid the validFlag variable is set to True.

The flowchart rejects invalid data and calls itself if it detects invalid inputs like strings, negative numbers.

 

Get Number of Digits of a Number

Sample Output

All the invalid recursion call stack is rejected and the valid one is executed in the flowchart.

Flowchart Input for Number of Digits

 

User Input =www.TestingDocs.com
Error: Enter valid number. Please try again.
User Input =-79
Enter Positive Number
User Input =67856
Number of digits in the number=5

 

We can see that the flowchart rejected Strings and negative numbers as invalid input. The limitation of the flowchart is that it only works for numbers and not for floating-point numbers like 6784.85

Raptor Tutorials on this website can be found at:

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

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

Related Posts

Bull

RAPTOR Flowcharts /

How to draw Bull’s Eye Raptor Graphics Flowchart

Weekly Gross Pay Raptor Flowchart

RAPTOR Flowcharts /

Weekly Gross Pay Raptor Flowchart

Reptition Structure

RAPTOR Flowcharts /

How to add repetition structure to the Raptor Flowchart

Selection Symbol

RAPTOR Flowcharts /

How to use selection symbol in Raptor flowchart

Calculator Raptor Flowchart

RAPTOR Flowcharts /

Calculator Raptor Flowchart

‹ How to find square root of a number in Raptor Flowchart?› Flowchart to determine whether student has passed or failed in a subject.

Recent Posts

  • What are the advantages of PHP?
  • What are the advantages of JavaScript?
  • How to Hide Taskbar on Windows 11
  • How to edit PATH variable on Windows 11?
  • Enable BitLocker Drive Encryption on Windows 11
  • How to lock Windows 11 PC
  • How to Add, Remove Widgets on Windows 11
  • How to Rename PC on Windows 11?
  • How to Shut down Windows 11 PC?
  • How to launch command prompt on Windows 11

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com