PseudoChartPseudoChart

Average of Numbers

Global

Basics

Created by pattakorn.k on Oct 1, 2026

Pseudocode
// PSC:1.0 Average
// Description: Adds up numbers until 0 is entered, then prints their average

BEGIN Average
  LET total = 0
  LET count = 0
  INPUT "Enter a number (0 to stop): " value
  WHILE value != 0
    LET total = total + value
    LET count = count + 1
    INPUT "Enter a number (0 to stop): " value
  END WHILE
  IF count = 0
    OUTPUT "No numbers were entered"
  ELSE
    OUTPUT "Average: " total / count
  END IF
END
Interactive Preview
Generating flowchart…