Also, a good thing to study is Boolean Algebra. It helps sort out unnecessary if/then statements, verify all possible states are covered, and can be used to simplify complicated if/then trees into their smallest form.
you can take this as an example of how to use if-else in a loop. This program will print all the elements present on an even index and print "odd index" in place of all index elements of array.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.