Tags:
tag this topic
create new tag
view all tags
---+How to debug your program 1. get it to compile 1. Comment out all code but your first loop that gets a valid input 1. Have it output the number when done. Run and fix it until it works. 1. Uncomment the code that does the counting. 1. Make sure that the loop for the correct input that is inside this loop is the same code as what you debugged first 1. Add code to output each of your counters inside the loop. 1. Run the code. Make sure it is counting correctly for each color and your total counter. Fix the code that you need to. 1. Uncomment your output code 1. See if it works now. If you are getting 0's, check a different hint. 1. If this is taking more than 15 minutes or you are getting frustrated, ask for help 1. When it works, remove all your debugging output statements
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2022-12-29
-
cathybareiss
Home
Site map
Assessment web
BethelAIResources2026 web
CenterForComputing web
ChatGPT web
Intro2AIatBethel web
Main web
Sandbox web
TWiki web
CenterForComputing Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback