USE TOP DOWN DESIGN
1. Analysis
- looking for a distance of two points on a coordinate input x1, x2, y1, y2.
2. identification
- input : koordinat A(x1,y1) & B(x2,y2)
- output : distance
3. algorithms
- declaration
2. description
- x1, x2, y1, y2, a, b : integer
- distance : float
- Baca x1;
- Baca x2;
- Baca y1;
- Baca y2;
- distance = (sqrt (((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1))));
- end (write range)
Leave reply