![]() Just like always, our “mental model” of a computer will first skim through the code to find all of the procedures, and then it will reach the call to the main() procedure at the bottom of the code as shown here: As always, we’ll start our code trace as shown below: Let’s run trace through this program a couple of times to see how an if-else statement works in pseudocode. ![]() ![]() This program will accept input from the user, and then determine if the user has input an even or odd number using the modulo operator.
0 Comments
Leave a Reply. |