1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fortran DO Statements (how many loop times)

  1. Mar 13, 2013 #1
    Hello,

    Examining the following DO statements and determining how many times each loop will be executed. Assume that all loop index variables are integers.

    (a) DO irange = -32768, 32767
    (b) DO j = 100, 1, -10
    (c) DO count = 2, 3, 4
    (d) DO index = -4, -7

    (e) DO i = -10, 10, 10
    The loop will take 10 increments and will run 2 times.

    Thanks for any help.
     
    Last edited: Mar 13, 2013
  2. jcsd
  3. Mar 13, 2013 #2

    SteamKing

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    If you don't try to evaluate at least one or two of the easy statements, you won't get any help on the harder ones.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Fortran DO Statements (how many loop times)
  1. Do Loops in Fortran 95 (Replies: 0)

Loading...