INTRODUCTION TO PROBLEM SOLVING An algorithm is a sequence of simple steps that can be followed to solve a problem. These steps must be organized in a logical, and clear manner. We design algorithms using three basic methods of control: sequence, selection, and repetition. 1.1 Sequential control. Sequential Control means that the steps of an algorithm are carried out in a sequential manner where each step is executed exactly once. Let’s look at the following problem: We need to obtain the temperature expressed in Farenheit degrees and convert it to degrees Celcius. An algorithm to solve this problem would be: 1. Read temperature in Farenheit 2. Apply conversion formula 3. Display result in degrees Celcius In this example, the algorithm consists of three steps. Also, note that the description of the algorithm is done using a so-called pseudocode. A pseudocode is a mixture of English (or any other human language), symbols, and selected features commonly used in programming languages. Here is the above algorithm written in pseudocode:
Frontiers, E. (2023). Programming Building Blocks. Afribary. Retrieved from https://afribary.com/works/programming-building-blocks
Frontiers, Edu "Programming Building Blocks" Afribary. Afribary, 23 Feb. 2023, https://afribary.com/works/programming-building-blocks. Accessed 21 Nov. 2024.
Frontiers, Edu . "Programming Building Blocks". Afribary, Afribary, 23 Feb. 2023. Web. 21 Nov. 2024. < https://afribary.com/works/programming-building-blocks >.
Frontiers, Edu . "Programming Building Blocks" Afribary (2023). Accessed November 21, 2024. https://afribary.com/works/programming-building-blocks