Flowchart (ISO 5807)
Source code
Java
class Integral {
static double rect(double a, double b, int n) {
double h = (b - a) / n;
double s = 0;
for (int i = 0; i < n; i++) {
double x = a + i * h;
s = s + x * x * h;
}
return s;
}
}The editor opens with this code — change it and the chart redraws.
- Language
- Java
- Constructs
- numeric integration
- Topic
- Algorithms
- Formats
- Word, Visio, draw.io, PDF, SVG