Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7858647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:32:32+00:00 2026-06-02T21:32:32+00:00

I would be grateful if someone could help me out here. I’m just starting

  • 0

I would be grateful if someone could help me out here. I’m just starting out learning how to program, so there is a great chance I’m missing something very obvious. I’m trying to write a program in Fortran 90 that solves question 4 i) on page 45 of this pdf. I have finally managed to get my code to compile to something, but now that something is somewhat rubbish, the data it produces is crazy (as time increases, I get a decrease in distance after whatever I input at t0). Can someone spot my mistake? I realize this is quite a lot of code to look through, I’m sorry for asking so much of you. Thanks in advance for looking through!


   PROGRAM PARACHUTIST
   ! Tabulation of parachutist's descent z and and speed zdot
   ! as functions of time t

     !Assign the program's associated constants

    IMPLICIT NONE
      REAL z, zdot, g, U1, U2, z0, u0, t0, q0, t, x,c,s
    INTEGER I


g=9.8
U1=54
U2=5

!Break z0 down a little with q0

q0=COSH(g*t0/U1)
z0=U1**2/g*LOG(q0)
u0=U1*TANH(g*t0/U1)

      !Prompt for and read in the free-fall time

      Print*, 'Input free-fall time in seconds:'
      Read*, t0

      !Print the table headings
      WRITE(*,1000)

1000 FORMAT (6X, 'TIME', 6X, 'DISTANCE', 6X, 'VELOCITY',            /6X, '(SEC)', 7X, '(M)', 10X, '(M/SEC)',&
        /6X, '0.0', 10X, '0.0', 10X, '0.0' )

      !Loop covering the specified times
      t=0 

    DO I=0,20

  ! Calculate the distance above ground
200         IF(t<=t0) THEN
            x=g*t/U1
            z=U1**2/g*LOG(COSH(x))
            zdot=U1*TANH(x)

    Elseif(t>t0) THEN
            x=g*(t-t0)/U2  
    !store re-used expressions

            c=cosh(x)
            s=sinh(x)
            z= z0 + (U2**2/g)*LOG(c+ (u0/U2)*s)
            zdot=U2*(U2*s+u0*c)/(U2*c+u0*s) 

        Endif

         !Print a line of table using T formats
         WRITE(*,100) t, z, zdot
100      Format(4X, F5.2, 6X, F7.2, 6X, F7.2)

!Stop with message if landed

         If(z.GE.500) THEN
        PRINT*, 'LANDED'
        STOP
         !If we haven't yet landed then increment t as in 
        !   problem specs
         Elseif(t<15) then
            t=t+1
         Elseif(t.GE.15) then
            t=t+10

        ENDIF

     !End of the t-loop
      END DO

  END PROGRAM PARACHUTIST
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T21:32:37+00:00Added an answer on June 2, 2026 at 9:32 pm

    I wrote this as two comments, but it was really too lengthy. Go ahead and delete it all if you had planned to do so. I just browsed through a document comparing Fortran77 and “modern” Fortran90. (I coded in Fortran77 when I was just starting school, awhile ago…). Here are some suggestions:

    Be careful with your use of “ELSEIF”. It is usually okay for ELSE and IF to have the space omitted, but that is not true otherwise with free-format code (I think the only other instances of space-optional are DOUBLE PRECISION, ELSE IF, GO TO, END DO, and END IF).

    An advantage of using Fortran90 is that you shouldn’t even need ELSE IF’s, (nor computed GOTO’s!) as there is SELECT CASE.

    You shouldn’t need FORMAT either, as it can be incorporated directly with a format string in the READ or WRITE statement itself.

    Yes, you can use either the old Fortran 77 operators .GE..GT..EQ..NE..LE..LT. or the new ones >= > == /= <= <. However, I’m not sure if you should mix them, which I noticed in your code.

    EDIT: The second link above, about Control Structures, describes how you can use DO loops instead of IF’s in Fortran90, sections 3.2 – 3.5. You can use named DO’s, indefinite DO loops, DO WHILE’s, all sorts of things! There are examples too. (The name of the entire document is Fortran90 for Fortran77 Programmers.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would be so very grateful if someone could help me out! I have
I would be grateful if someone could help me out with this. In my
I would be very grateful if someone could help me with this. I have
This is driving me crazy. Very grateful if someone could help me out! Problem:
I would be very grateful if someone could help me break through this issue
I am actually new at Qt and would be grateful if someone could explain
I'm wondering if there is some comprehensive tutorial or someone of you can help
wondering if someone could help me, but at the same time hopefully I can
I really hope someone will be able to help me out with this. I
I was wondering if someone could help me with a bit of javascript and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.