Skip to main content

3.1) Input And Output


You have already been shown how to do some input/output (IO) since you have used a print *, statement in the first two examples. Thinking back to the example of the code that converts temperature from Celsius to Fahrenheit, it is vitally important to be able to change the value of tc without having to recompile everything to run it. It would be slow if you had to compile every time you wanted to consider a new temperature to convert.

To make your program able to run over and over without being recompiled then you will need to read in the values you want to work with. To do this you need to include a read *, statement. See the video for an example.

Example showing how to input values into a program.