Alogorithm For Determining EVEN or ODD:

 

  1. Ask for an integer.
  2. Set N equal to the integer typed in.
  3. Set H equal to N/2.
  4. If H is an integer, go to step 7.  (If not, proceed to step 5.)
  5. Print “That’s an odd number.”
  6. Skip to the end (step 8).
  7. Print “That’s an even number.”
  8. End of procedure.

 

 

 

Program For Determining EVEN or ODD:

 

110    Print “Type in an Integer:”

120    Input N

130    Let H=N/2

140    If H=INT(H) then 170

150    Print “That’s an odd number.”

160    Go To 199

170    Print “That’s an even number.”

199  END