Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please read question carefully!! use fortran 95 geanny app ENGR2216 ortran Progr

ID: 3857457 • Letter: P

Question


please read question carefully!!
use fortran 95
geanny app

ENGR2216 ortran Programmn Test 1 Duration : 75 minutes ID# Section/Instructor: 3o Problem 3: 110 marks] Write a Fortran program to ask select case construct, check if the entered number is negative, zero, or positive; and also check if the entered number is odd or the program should be a positive and odd number. the user to enter an integer number n from the keyboard. By using astruct, check i h en e, zero,or positive, and alks check if the cantered number is od or even. For example, if the user emtered number 3, t of 2

Explanation / Answer

program check
integer::n
Print *, "Enter a intger number n"
read *, n
if(n>0)then
if(mod(n,2)==0)then
Print *, "Positive and even"
else
Print *, "Positive and odd"
end if

else if(n<0)then
if(mod(n,2)==0)then
Print *, "Negative and Even"
else
Print *, "Negative and Odd"
end if
  
else
Print *, "Zero"
  
end if
  
  
end program check