Fortran Programming in FORTRAN - Begginer

AI Thread Summary
The discussion revolves around creating a program that reads "N" pairs of points and identifies which of these points lie within a specified quadrilateral defined by the vertices (2,2), (2,5), (7,5), and (5,2). The key requirement is to determine if the points are inside or on the boundary of this quadrilateral. To achieve this, the program must ensure that the y-coordinates of the points fall within the range of 2 to 5. For the x-coordinates, a more complex condition applies, requiring the calculation of the line equation connecting the points (5,2) and (7,5) to establish the upper limit for valid x-values. This involves deriving the equation in the form x = ay + b to accurately assess whether the points meet the criteria for inclusion within the quadrilateral.
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.
 
Technology 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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
12
Views
1K
Replies
3
Views
2K
Replies
20
Views
6K
Replies
5
Views
2K
Replies
8
Views
2K
Back
Top