Operators and Expressions

 

Read Section 4.5 to 4.8 in the FORTRAN95 Manual and answer the questions in Exercises.

 

Exercises

1) How do you write xy in a program?

2) Why can integer divisions sometimes produce unwanted results? What are the results of following formulas?

            7/2       7.0/2.0             9/10     9.0/10.0           16-5*(16/5)     16.0-5.0*(16.0/5.0)    

3) What are the older forms of the relational operators, <, <=, >, >=, ==, and /=?

4) When is an ampersand (&) needed in a statement?