"AddOperator requires 2 numbers" When Calculating Triangle Area. In Flowgorithm

I am creating a Flowgorithm flowchart to find the triangle with the maximum area from a given set of N points. My approach follows these steps: Input N points (each with x and y coordinates). Use nested loops to generate all possible combinations of three points. Calculate the area of the triangle using the formula: area=0.5×∣x[i]×(y[j]−y[k])+x[j]×(y[k]−y[i])+x[k]×(y[i]−y[j])∣ Check if the current area is greater than maxArea, and update it accordingly. Output the triangle with the maximum area. Issue: When I try to run the flowchart, I get the following error: "AddOperator requires 2 numbers; the specified values cannot be converted." I suspect the issue is occurring when trying to store the triangle's points as a string. Here's how I attempted it: If area > max_area Then max_area = area max_triangle = "Triangle: (" + ToString(x[i]) + "," + ToString(y[i]) + "), (" + ToString(x[j]) + "," + ToString(y[j]) + "), (" + ToString(x[k]) + "," + ToString(y[k]) + ")" What I've Tried: Converting numbers to strings explicitly using ToString(). Breaking the concatenation into separate steps: If area > max_area Then max_area = area point1 = "(" + ToString(x[i]) + "," + ToString(y[i]) + ")" point2 = "(" + ToString(x[j]) + "," + ToString(y[j]) + ")" point3 = "(" + ToString(x[k]) + "," + ToString(y[k]) + ")" max_triangle = "Triangle: " + point1 + ", " + point2 + ", " + point3

Feb 5, 2025 - 14:03
 0
"AddOperator requires 2 numbers" When Calculating Triangle Area. In Flowgorithm

Here's the image of the flowchart

enter image description here

I am creating a Flowgorithm flowchart to find the triangle with the maximum area from a given set of N points. My approach follows these steps:

Input N points (each with x and y coordinates).

Use nested loops to generate all possible combinations of three points.

Calculate the area of the triangle using the formula:

area=0.5×∣x[i]×(y[j]−y[k])+x[j]×(y[k]−y[i])+x[k]×(y[i]−y[j])∣ Check if the current area is greater than maxArea, and update it accordingly.

Output the triangle with the maximum area.

Issue: When I try to run the flowchart, I get the following error:

"AddOperator requires 2 numbers; the specified values cannot be converted."

I suspect the issue is occurring when trying to store the triangle's points as a string. Here's how I attempted it:

If area > max_area Then
 max_area = area
max_triangle = "Triangle: (" + ToString(x[i]) + "," + ToString(y[i]) + "), (" + ToString(x[j]) + "," + ToString(y[j]) + "), (" + ToString(x[k]) + "," + ToString(y[k]) + ")"

What I've Tried: Converting numbers to strings explicitly using ToString(). Breaking the concatenation into separate steps:

 If area > max_area Then
 max_area = area
 point1 = "(" + ToString(x[i]) + "," + ToString(y[i]) + ")"
 point2 = "(" + ToString(x[j]) + "," + ToString(y[j]) + ")"
 point3 = "(" + ToString(x[k]) + "," + ToString(y[k]) + ")"
 max_triangle = "Triangle: " + point1 + ", " + point2 + ", " + point3