A pprogram that keeps reading positive numbers until the user enters a zero and print the smallest number

1 answer

print "number: "; read value
smallest = value
while value ≠0
  read value
  if value < 0 then {print "Error: negative value"; continue}
  if value < smallest then smallest = value
loop

if value > 0 then
  print "Smallest: ",smallest
else
  print "No values entered."
endif