Fortran Past Questions and Answers
Fortran Past Questions and Answers
Fortran Past Questions and Answers
2017/2018
1a. Define an expression
An expression is a combination of one or more operands, zero or more operators, and zero or
more pairs of parentheses
b. Mention types of operators and list the hierarchy of operators
Types of Operators
1. Arithmetic operators
2. Relational operators
3. Logical operators
4. Character
5. Bitwise operators
6. Assignment operators
Hierarchy of operators
1. Operators within parentheses
2. Exponential
3. Multiplication
4. Division
5. Addition
6. Subtraction
\1c. Using a do loop statement. Write a Fortran program to display the string
“COMPUTER SCIENCE” ten times
b. Write a Fortran 90 program that will print the sum of even numbers between 1 to 100
b. In the below program, find errors, if any, then write the correct program
Program bug
! this program is full of errors
Real : : a, b, c
a=b+c
read *, c
print *, a
end program simple
Solution
program bug
implicit none
real:: a, b, c
!
!this is full of errors
!
read(*,*)b,c
a=b+c
print*,a
stop
end program bug