Flowchart (ISO 5807)
Source code
Java
static double average(int[] a) {
int sum = 0;
for (int x : a) {
sum += x;
}
return (double) sum / a.length;
}The editor opens with this code — change it and the chart redraws.
- Language
- Java
- Constructs
- sum / count
- Topic
- Loops
- Formats
- Word, Visio, draw.io, PDF, SVG