Flowchart (ISO 5807)
Source code
Pascal
function digits(n: integer): integer;
var c: integer;
begin
c := 0;
if n = 0 then
c := 1;
while n <> 0 do
begin
c := c + 1;
n := n div 10;
end;
digits := c;
end;The editor opens with this code — change it and the chart redraws.
- Language
- Pascal
- Constructs
- how many digits
- Topic
- Loops
- Formats
- Word, Visio, draw.io, PDF, SVG