Programming in FORTRAN - Begginer

  • Context: Fortran 
  • Thread starter Thread starter JesusCristo
  • Start date Start date
  • Tags Tags
    Fortran Programming
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
JesusCristo
Messages
2
Reaction score
0
I've to do a program which read "N" pairs of points and print the points which are contained in a two dimensions quadrilateral domain with vertices on (2,2), (2,5), (7,5) and (5,2),

Can anyone help me?

Thanks for the atention and patience.
 
Physics news on Phys.org
Can you explain a little more.
I've to do a program which read "N" pairs of points
Got it!

print the points which are contained in a two dimensions quadrilateral domain with vertices on (2,2), (2,5), (7,5) and (5,2)
I'm lost there.
 
The program should identify which of the N input points are inside or on the boundary of the quadrilateral you described, right?

If that's right, the y values of the points have to satisfy 2 <= y <= 5. For the x values it's a little harder. The x values have to lie between 2 and the x value on the line that joins the points (5,2) and (7, 5). Find the equation of this line and write it as x = ay + b.