Programming in FORTRAN - Begginer

Then, for each x input, check if a * x + b >= y.If I understand correctly, the program needs to identify which of the N input points are inside or on the boundary of a quadrilateral with vertices at (2,2), (2,5), (7,5), and (5,2). The y values of the points must be between 2 and 5, and the x values must be between 2 and the x value on the line connecting (5,2) and (7,5). To check this, we can find the equation of the line and then use it to compare the x and y values of each input point. In summary, you need to create a program that reads N
  • #1
JesusCristo
2
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
  • #2
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.
 
  • #3
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.
 

What is FORTRAN and why is it used?

FORTRAN (FORmula TRANslation) is a high-level programming language widely used for scientific and engineering applications. It was developed in the 1950s and is still used today due to its efficiency in handling mathematical and scientific computations.

What are the basic concepts of FORTRAN programming?

The basic concepts of FORTRAN programming include data types, variables, arrays, control structures (such as loops and conditional statements), and subroutines. These concepts are used to write instructions that are executed by the computer to solve mathematical and scientific problems.

Is FORTRAN still relevant in modern programming?

Yes, FORTRAN is still relevant in modern programming, especially in scientific and engineering fields. It is still used in many legacy systems and has been updated over the years to include new features and capabilities.

What are the advantages of using FORTRAN?

Some advantages of using FORTRAN include its efficiency in handling numerical computations, its ability to easily handle large datasets, its portability across different computer systems, and its extensive library of built-in functions for mathematical and scientific calculations.

How can I learn FORTRAN as a beginner?

There are many resources available for beginners to learn FORTRAN, including online tutorials, textbooks, and coding challenges. It is also helpful to practice writing code and familiarize yourself with the syntax and basic concepts of the language. Additionally, joining a community of FORTRAN programmers can provide valuable support and guidance.

Similar threads

  • Programming and Computer Science
Replies
12
Views
963
  • Programming and Computer Science
Replies
4
Views
616
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
Replies
20
Views
5K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
26
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
5
Views
1K
Back
Top