Question: The code below is a FORTRAN 95 program (that works) that calculates the area and circumference of a circle. I need to add functions and

The code below is a FORTRAN 95 program (that works) that calculates the area and circumference of a circle. I need to add functions and subroutines to the code.

The code below is a FORTRAN 95 program (that works) that calculates

PROGRAM CIRCLE

REAL PI, C, R, A INTEGER O PI = 3.14

10 PRINT *, 'PLEASE CHOOSE ONE OF THE MENU OPTIONS:' PRINT *, '1. CALCULATE THE CIRCUMFERENCE OF A CIRCLE' PRINT *, '2. CALCULATE THE AREA OF A CIRCLE' PRINT *, '3. EXIT PROGRAM' WRITE(*,*) READ *, O IF (O == 1) THEN 20 PRINT *, 'ENTER THE RADIUS: ' READ *, R IF (R PROGRAM CIRCLE REAL PI, C, R, A INTEGER O PI = 3.14 10 20 30 PRINT *, PLEASE CHOOSE ONE OF THE MENU OPTIONS: PRINT *, '1. CALCULATE THE CIRCUMFERENCE OF A CIRCLE" PRINT *, *2. CALCULATE THE AREA OF A CIRCLE PRINT *, *3. EXIT PROGRAM WRITE (*, *) READ *, O IF (0 == 1) THEN PRINT * ENTER THE RADIUS: READ *, R IF (R = 0.0) THEN PRINT *, "NUMBER CANNOT BE NEGATIVE NOR O. PLEASE TRY AGAIN.' GOTO 20 END IF C = 2*PI*R PRINT *, *CIRCUMFERENCE = ", C WRITE (*, *) GOTO 10 ELSE IF (0 == 2) THEN PRINT *, 'ENTER THE RADIUS: 1 READ *, R IF (R

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!