Flowchart (ISO 5807)
Source code
C
void sortThree(int a[]) {
int t;
if (a[0] > a[1]) {
t = a[0];
a[0] = a[1];
a[1] = t;
}
if (a[1] > a[2]) {
t = a[1];
a[1] = a[2];
a[2] = t;
}
if (a[0] > a[1]) {
t = a[0];
a[0] = a[1];
a[1] = t;
}
}The editor opens with this code — change it and the chart redraws.
- Language
- C
- Constructs
- swap via if
- Topic
- Branching
- Formats
- Word, Visio, draw.io, PDF, SVG