Write your algorithm on the left or pick an example above
STARTBegin the algorithm — rounded terminal nodeEND / STOPTerminate the algorithm — rounded terminal nodeINPUT xRead a value — parallelogram shapeOUTPUT xWrite / print a value — parallelogram shapeRETURN xReturn from function — same as OUTPUTIF c THENCondition in a diamond. Must end with ENDIFELSEOptional false branch inside the IF blockENDIFCloses an IF blockWHILE c DOCondition diamond, body loops back. Close with ENDWHILEENDWHILECloses a WHILE blockFOR x DOSame as WHILE — close with ENDFORENDFORCloses a FOR blockDOStart a DO...WHILE loop body. Close with WHILE cWHILE cEnd of DO...WHILE — condition checked after bodyCALL nameCall a subroutine — double-bar rectangle shapeFUNCTION nameSame as CALL — double-bar rectangleSWITCH xStart a switch block on variable xCASE vBranch for value v — diamond with labelDEFAULTFallback branchENDSWITCHCloses the switch blockPREP xPreparation / initialization — hexagon shapeDISPLAY xScreen output — display shape (pentagon)CONNECTOR nFlow connector — small circle with labelBREAKExit current loop — red terminal-style nodeCONTINUESkip to next iteration — amber nodeCOMMENT textAnnotation — dashed box off to the sideany textLines without a keyword become rectangular Process nodes