Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
example of a logic bug using pseudocode
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="rayleon, post: 3594286"] Dear Sirs or Madam: I'm almost done with my CIS 150 - Programming Fundamentals class. I have a question that I believe I have two answers for and would like to double check with the group for correctness. 9. Present an example of a logic bug using pseudocode and explain your answer. (10 points) My two pseudocode snippets would be: 1. Set counter to 10 WHILE counter>=5 DO increase counter by 10 This is a logic bug because the above will produce unintended or undesired output or other behavior, but not fail. The count would go on forever, although it may not immediately be recognized. -------------------------------------------------------------------------------------------------------------------------------------------------- 2. if (Temperature > 30) || (Temperature < 30 ){ closeWindows; } This is a logic bug because the above will produce unintended or undesired output or other behavior, but not fail. The windows would never get closed, although it may not immediately be recognized. If I am in error on my assumptions any advice is greatly appreciated. Also if anyone has a better example please feel free to advise me also. You've all been great and I hope I can help someone one day here also. Thank You, Ray [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
example of a logic bug using pseudocode
Top