Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(a) Identify the outcomes (be printed) of the below FORTRAN code segments: Code Snippet 1 PROGRAM test 1 IMPLICIT NONE LOGICAL :: x= TRUE., y
(a) Identify the outcomes (be printed) of the below FORTRAN code segments: Code Snippet 1 PROGRAM test 1 IMPLICIT NONE LOGICAL :: x= TRUE., y = FALSE., z z = (x .AND. y) OR. (x EQV. y) PRINT *, Z END PROGRAM test1 Code Snippet 2 PROGRAM test2 IMPLICIT NONE INTEGER :: i, j, total = 0 DO j = 1, 2 DO i = 1, 3 total = total + (j * i) END DO END DO PRINT *, total END PROGRAM test2 (b) How functions and subroutines are defined in a FORTRAN program? Use pseudo-code to explain your answer. (c) Write a simple FORTRAN code that takes user inputs r1, r2 and call a function to calculate the area of the circles using rl, r2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started