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