📄️ A
This algorithm is a simple set of instructions to add two numbers. It begins by declaring three containers (variables) to store values - n1, n2, and SUM. It then asks the user for two numbers, adds them together, and displays the result. Finally, it signals the end of the process.
📄️ B
This algorithm is designed to subtract one number (n2) from another number (n1). It starts by declaring three containers (variables) to hold values - n1, n2, and diff. The user is prompted to input two numbers, which are stored in n1 and n2. The algorithm then subtracts n2 from n1 and stores the result in a variable called "diff". Finally, it displays the result of the subtraction (diff) to the user.
📄️ C
This algorithm is designed to find the smallest number among three input numbers. It begins by declaring four containers (variables) to hold values- n1, n2, n3, and MIN. The user is prompted to input three numbers, which are stored in n1, n2, and n3. The algorithm then compares these numbers to determine the smallest one, storing it in the MIN variable. Finally, it displays the smallest number (MIN) to the user.
📄️ D
This algorithm aims to find the largest number among three input numbers. It begins by declaring four containers (variables) to hold values- n1, n2, n3, and MAX. The user is prompted to input three numbers, which are stored in n1, n2, and n3. The algorithm then compares these numbers to determine the largest one, storing it in the MAX variable. Finally, it displays the largest number (MAX) to the user.
📄️ E
This algorithm is designed to calculate the sum of numbers starting from 1 up to a given value, N. It begins by declaring three containers (variables) to hold values- N, count, and SUM. The user is prompted to input a value for N. The algorithm then initializes count and SUM, followed by iterating through a loop, adding each count to the SUM. Once the loop is complete, it displays the total sum (SUM) to the user.