Chapter 10: Problem 3
Fortran has a three-way IF statement of the form IF(expression) \(n 1, n 2, n 3\) where expression is a numeric expression and n1, n2, n3 are statement numbers. Control transfers to statement \(\mathrm{n} 1\) if expression is negative, to statement \(n 2\) if expression equals 0 , and to \(n 3\) if expression is positive. What is the output of the following section of Fortran code if \(/\) has the value 3 and \(M A X\) has the value 4 ? IF (I - MAX) \(10,20,30\) 10 WRITE \((*, *) \quad 2 * I\) 20 WRITE \((*, *)\) I*I 30 WRITE \((*, *) \quad I * \star \mathrm{MAX}\)
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.