Find the Larger Number
Explore how to determine the larger of two numbers by applying conditional statements and creating flowcharts. This lesson guides you through reading the problem, designing a solution, writing pseudocode, and verifying outcomes with test cases to build your decision-making skills in programming.
Problem statement
You have two numbers n1 and n2, and you have to find the larger number.
The main steps in problem-solving
Understand the problem
Carefully read the problem statement, and think about the desired output. The output should be the larger number.
Come up with a practical solution
Pick some numbers. For instance, 4 is greater than 1. To ...