Flowchart (ISO 5807)
Source code
C#
class Program {
static int SumProperDivisors(int n) {
int s = 0;
for (int i = 1; i <= n / 2; i++) {
if (n % i == 0) {
s = s + i;
}
}
return s;
}
}The editor opens with this code — change it and the chart redraws.
- Language
- C#
- Constructs
- loop + condition
- Topic
- Loops
- Formats
- Word, Visio, draw.io, PDF, SVG