compute perimeter of triangle ------------ compute length of side 1 compute length of side 2 compute length of side 3 add them ------------ side 1 is from point (x1, y1) to (x2, y2) length is side 2 is from point (x2, y2) to (x3, y3) length is side 3 is from point (x3, y3) to (x1, y1) length is o compute length of side 1: squareroot ((x2 - x1) square + (y2 - y1) square) o compute length of side 2: squareroot ((x3 - x2) square + (y3 - y2) square) o compute length of side 3: squareroot ((x3 - x1) square + (y3 - y1) square) --------------------- read in x1 read in y1 read in x2 read in y2 read in x3 read in y3 side1length = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) side2length = sqrt((x3 - x2) ** 2 + (y3 - y2) ** 2) side3length = sqrt((x3 - x1) ** 2 + (y3 - y1) ** 2) perimeter = side1length + side2length + side3length y = 1 | | | | y = 0 ----------- x = 0 x = 1