Trouble with figuring out the flowchart to pseudocode problem

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Thread Solved

Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: Trouble with figuring out the flowchart to pseudocode problem

 
0
  #11
Jan 16th, 2006
you missed out B!
Try
A
While c or not d
(
B
if not d then do E
)
F
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: Trouble with figuring out the flowchart to pseudocode problem

 
0
  #12
Jan 16th, 2006
which is almost the same as yours except i included the B (no biggie) and no extra variable needed hence performance should be marginally better.
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 24
Reputation: waldis is an unknown quantity at this point 
Solved Threads: 0
waldis's Avatar
waldis waldis is offline Offline
Newbie Poster

Re: Trouble with figuring out the flowchart to pseudocode problem

 
0
  #13
Jan 16th, 2006
Yup, I did miss out 'B' (I guess I should blame my keyboard, how bad it is, etc., but I won't)

What if 'c' is FALSE and 'd' is FALSE, it will go to 'B' insted of 'F' where it should...

Would this work:

A
while c AND not d
  B
  if not d then
    E
F

yeah, but if 'c' is TRUE and 'd' is TRUE, instead of going to 'B' this time it'll go to 'F'...
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 275
Reputation: f1 fan is an unknown quantity at this point 
Solved Threads: 11
f1 fan f1 fan is offline Offline
Posting Whiz in Training

Re: Trouble with figuring out the flowchart to pseudocode problem

 
0
  #14
Jan 17th, 2006
no because your chart says if it is not c then it can go to F without worrying about d. I had the c AND not d and changed it. Which means it is

While not(not c or d)

Thats dragged up some old De Morgans Theorum from years back then At least i think it is his (change ands to ors and ors to ands, not each individual and then not the lot)
Reply With Quote Quick reply to this message  
Join Date: Jan 2006
Posts: 24
Reputation: waldis is an unknown quantity at this point 
Solved Threads: 0
waldis's Avatar
waldis waldis is offline Offline
Newbie Poster

Re: Trouble with figuring out the flowchart to pseudocode problem

 
0
  #15
Jan 17th, 2006
Thanks for your help, it starts clicking in, I just need to keep keeping on with these problems and one day it'll click in and stay

Waldis
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC