Flowchart (ISO 5807)
Source code
Go
func countDivisors(n int) int {
count := 0
for i := 1; i <= n; i++ {
if n%i == 0 {
count++
}
}
return count
}The editor opens with this code — change it and the chart redraws.
- Language
- Go
- Constructs
- loop + counter
- Topic
- Loops
- Formats
- Word, Visio, draw.io, PDF, SVG