Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags


Raptor flow chart to check whether a number is odd or even

Avinash mattupalli

Before you read this shot, you should have Raptor software installed in your system.

In Raptor, the oval shape is used for start and stop, the rectangular box is used for assignment, rhombus with arrow top left side is used for input, rhombus shape with arrow right down is used for output, and a rectangular box with arrow middle right side is for calling functions, etc.

Flowchart explanation

  1. First, click on the input symbol to take the number as an inputwhich you can find on the left side.

  2. Then, click between start and stop to insert it.

  3. After inserting that block, double click on it, and a new window will open asking for the message and variable name. You can give a message to the user, like in this flowchart, that says, “Enter a number: and a variable name to store the input value(in this flowchart, I am taking ‘n’)”.

  4. After that, click on the selection block; then, click between the input and the end block in the flowchart to insert the selection block in the flowchart.

  5. Now, double-click on the diamond shape of the selection block to give a condition to check.

  6. In this flowchart, n%2==0 is the condition used to check if a number is even or odd.

  7. In the above condition, ‘%’ is modulus, meaning we will get a remainder.

  8. We use ‘==’ to check the condition and ‘=’ to assign.

  9. Now, click on the output block and insert them in the selection block (left one block and right one block).

  10. Double click on output block, which is inserted in selection block, and a new window will open. Within this window, you will have variable name +“message” (in the above flowchart, n+" is an even number", the right side output block gives n+" is an odd number".

  11. Click on the play button in the tools menu to run the flowchart.

Algorithm for flowchart

  1. Start
  2. Input a number
  3. Check whether the reminder is 0 or not if divided by 2
  4. Output, whether it is even or odd
  5. Stop



View all Courses

Keep Exploring