Flowchart Help with Homework Equations

  • Thread starter Thread starter Ronaldo95163
  • Start date Start date
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 1K views
Ronaldo95163
Messages
77
Reaction score
1

Homework Statement


Given in the picture below, part c

Homework Equations


The Attempt at a Solution

I attempted it with a flowchart shown in the pic below as well. Not sure if what I did was correct though
 

Attachments

  • flowcht.jpg
    flowcht.jpg
    30 KB · Views: 406
  • IMG_20140319_195209.jpg
    IMG_20140319_195209.jpg
    20.3 KB · Views: 473
Last edited by a moderator:
Physics news on Phys.org
Ronaldo95163 said:

Homework Statement


Given in the picture below, part c


Homework Equations





The Attempt at a Solution




I attempted it with a flowchart shown in the pic below as well. Not sure if what I did was correct though
Overall it looks OK to me, but I don't remember ever seeing a flowchart symbol to represent a for loop. Is that something you've been taught? There is a lot that goes on in a for loop that gets glossed over with such a symbol, such as the initialization of the loop counter variable, the test to get out of the loop, and the incrementing of the loop counter.
 
Our teacher showed us it as an automatic counter box, The left most value represents the starter value, the right most represents the amount to increment by each time, the top most is the variable and the bottom most is the value to end at
 
Ronaldo95163 said:
Our teacher showed us it as an automatic counter box, The left most value represents the starter value, the right most represents the amount to increment by each time, the top most is the variable and the bottom most is the value to end at

That's reasonable, but I agree w/ Mark that it glosses over the real workings. It is one thing if you use a high-level language loop control that pretty much mimics that box, but if you are writing full loop control in, say, assembly language, your flowchart will not reflect what the code really looks like and may confuse you if things go wrong and you have to debug it.