, CSCI 297-P2 -- FORTRAN

CSCI 297-P2 -- FORTRAN

Spring, 2020


Course Meeting Times

We will meet at 3:00 on Thursdays (somewhere). (At least we did until the university went to just online classes.)


Contact Information

The instructor for this course is Harry Hutchins.

          Office:            PM 465
          Telephone number:  753-6935
          E-mail:            t90hch1@cs.niu.edu
          Office hours:      1:00--4:00 on Tuesday and
                             1:00--4:00 on Friday
                             (I am sometimes in my office at other times as well.)


Announcements

It's about time to have an exam. You can find it here. As it does include questions about character variables, you may need to look up a few things. Work through it, type the answers on a copy, and send me the file by e-mail. When should it be due? I am making it available as of March 19. Please try to get it back to me within a week. If you have any questions, please ask.


Practice Exercises

Practice Exercise 1

Practice Exercise 2

Practice Exercise 3


Links to Assignments

You will find links here to assignments. Please do not work far ahead.

Assignment A We have a data file for this assignment, and we have some sample output as well.

Assignment B We have a data file for this assignment, and we have some sample output as well.

Assignment C We have a data file for this assignment, and we have some sample output as well.

Assignment D We have a data file for this assignment, and we have some sample output as well.

Assignment E We have two data files containing REAL numbers and COMPLEX numbers for this assignment.

Assignment F

Assignment G We have two data files for this assignment, 20 numbers and 200 numbers.

Assignment H We have three data files for this assignment: one, two and three.

Assignment I We have two data files for this assignment: one and two. We also have an Excel spreadsheet providing a picture of the data in the files.


Links to other documents

Course syllabus.

You will need a FORTRAN compiler. One choice is gfortran. If you want to download a copy of gfortran to install on your own computer, a good place to start is here. I suggest going to "MinGW build" and clicking on "installer". That will download a self-installing version of gfortran: just execute it to install gfortran.

The GNU gfortran compiler

A chart of ASCII values (This is a plain text file.)


Notes on various Topics in FORTRAN

Structure of a FORTRAN program

Types of variables

Assignment statements

Arithmetic

Logical expressions

Practice problems with operations

Character values and expressions

IF and other Decision Structures

Loops

Formatted Input and Output

Using files

Arrays

Functions and Subroutines

Derived Data Types

A note on 3 kinds of sorting

Sorting with Selection Sort

Sorting with Bubble Sort

Sorting with Insertion Sort

How to generate "random" numbers

How to get the date and time

An example program to compute square roots

An example program to compute a GPA

An example of recursion

A Tic-Tac-Toe board

Zeller's algorithm

Finding the Best-Fit Line

Arrays