for loop


I'm looking for some help with a problem I'm trying to solve and wondered if anyone could help.

I'm trying to calculate the largest possible area of a trapezium whose sides are at a variety of angles and lengths.

I used a for loop to calculate the different values for area with sides varying angle and fixed length. I then used another for loop to calculate values for area with varying side lengths and fixed angle.

It seems to be that the values for area continue to increase even when area should begin to reduce (after the peak value). So I'm basically getting the max area when the sides are at 90 degrees (when the shape is just a rectangle). Any suggestions what I might be doing wrong?
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!