Algorithm to find the greatest number among three numbers:
- Start
- Input three numbers, A, B, and C
- If A > B and A > C, then
- Print “A is the greatest number.”
- Else if B > A and B > C, then
- Print “B is the greatest number.”
- Else
- Print “C is the greatest number.”
- End
This algorithm compares all three numbers to determine the largest by checking conditions sequentially. If one number is greater than the other two, it is printed as the greatest.
Related Questions:
- Describe the steps involved in problem-solving.
- Calculate the area of a rectangle for a given breadth and length
- Write an algorithm that inputs length in inches and calculates and prints it in centimeters.
- Write an algorithm to find the sum of the given sequence. SUM = 20 + 25 + 30 + 35 + 40 + 45 + 50 + 55 + 60
- Write an algorithm to find the product of the given numbers. PRODUCT = 1 × 3 × 5 × 7 × 9 × 11 × 13 × 15
- Write an algorithm to print the multiplication table of a number in reverse order.
- Convert the algorithms of questions 4 to 9 into flowcharts.
- Explain the differences between an algorithm and a flowchart with examples.
- Write an algorithm to check whether a given number is even or odd.
- Define computer.
- What is an algorithm and what is the role of an algorithm in problem-solving?
- What is a flowchart?
- Draw any four graphical symbols used in a flowchart and explain them.
- What is the role of loops in programming?
- Differentiate between sequence, selection, and iteration in programming.
- Why is problem analysis important in programming?
- How does an algorithm help in efficient problem-solving?
- Explain the importance of using flowcharts before writing a program.
- Show memory hierarchy with the help of a diagram.
- Model Papers (1-10)