Flowchart (ISO 5807)
Source code
C++
int digitalRoot(int n) {
while (n >= 10) {
int s = 0;
while (n > 0) {
s += n % 10;
n /= 10;
}
n = s;
}
return n;
}The editor opens with this code — change it and the chart redraws.
- Language
- C++
- Constructs
- nested loops
- Topic
- Loops
- Formats
- Word, Visio, draw.io, PDF, SVG