6.5 Expressing Algorithms
In the previous sections, we have written programs to write out a greeting, read characters in and write them out in reverse order, add numbers together and print an error message if the sum is negative, and enter a value and read and sum that many numbers. We expressed the solution to each problem in paragraph form and then wrote the code. In computing, the plan for a solution is called an algorithm. As you saw, going from the problem in paragraph form to the code is not always a clear-cut process. Pseudocode is a language that allows us to express algorithms in a clearer form.
Pseudocode Functionality
Pseudocode is not a real computer language, but rather a shorthand-like language that people use to express actions. ...
Get Computer Science Illuminated, 7th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.