cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Confused as to indentifying parts of a l
Confused as to indentifying parts of a loop
Sep 29, 2009 at 8:20pm UTC
ashley19
(54)
Last <- 0;
Current <-1;
while (Current < 100) do
(print the value assigned to Current;
Temp <- Last;
Last <- Current; and
Current <- Last + temp)
What is the body of the loop? Where is the initialization step? The Modification step? and the test step?
Sep 29, 2009 at 11:32pm UTC
mcleano
(922)
Whats is this?
Sep 30, 2009 at 3:20am UTC
ashley19
(54)
That's what the book said?
Sep 30, 2009 at 10:29am UTC
mcleano
(922)
Well I would say the body of the loop is from "while (Current < 100)" downwards. But its ahrd to answer those questions when there's no code to work with.
Topic archived. No new replies allowed.