---
title: "Algorithm and flowchart help; Armstrong flowchart"
subject: "Computer Programming"
chapter: 2
key: "semester_1/computer_programming:algorithm-flowchart-armstrong"
source: https://www.bctengineer.com/q/semester_1/computer_programming/algorithm-flowchart-armstrong
site: BCT Engineering
---

# Algorithm and flowchart help; Armstrong flowchart

Computer Programming · Chapter 2: Problem solving using Computer

- Asked in: 2068 Chaitra, 2+3 marks
- Video: [Flowchart to check given number is armstrong or not? | #algorithm  & #flowchart #armstrongnumber](https://www.youtube.com/watch?v=gxeM27JTf24) — Indus Technologies
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_1/computer_programming/algorithm-flowchart-armstrong
- Whole chapter: https://www.bctengineer.com/md/semester_1/computer_programming/chapter-2

## Question

Does algorithm and flowchart design make programming faster and easier? Describe with strong supporting points. Also draw flowchart to check whether a number is Armstrong or not.

## Short answer

Yes, algorithm/flowchart helps by verifying logic early, easing debugging, enabling direct code conversion, providing documentation, and being language‑independent. To check Armstrong: count digits, sum each digit raised to that count; number is Armstrong if sum equals original.

## Answer

#### Do algorithm and flowchart make programming faster and easier?
Yes. Their supporting points are:
- **Logic is checked before coding:** mistakes in the method are found on paper, where they are cheap to correct.
- **Direct conversion to code:** each step or symbol becomes a statement, so coding is quick.
- **Fewer bugs and easier debugging:** a programmer can trace the flow to find the faulty step.
- **Easy understanding and teamwork:** others understand the logic without reading code.
- **Documentation and maintenance:** they remain as a record for later modification.
- **Language independent:** the same design can be used in C, Java or any language.

#### Flowchart for Armstrong number
An Armstrong number equals the sum of its digits each raised to the power of the number of digits (153 = 1³ + 5³ + 3³).

Part 1: count the digits

```text
       ( Start )
           |
      / Read N /
           |
    [ D = 0, T = N ]
           |
     +---->|
     |     v
     | < T > 0 ? >--No--> (A)
     |     | Yes
     | [ D = D + 1 ]
     | [ T = T div 10 ]
     +-----+
```

Part 2: add the digit powers and compare

```text
      (A)
       |
  [ T = N, S = 0 ]
       |
  +--->|
  |    v
  | < T > 0 ? >--No--+
  |    | Yes         |
  | [ R = T mod 10 ] |
  | [ S = S + R^D ]  |
  | [ T = T div 10 ] |
  +----+             |
                     v
              < S = N ? >
          Yes |          | No
  / Print "Armstrong" /  / Print "Not Armstrong" /
          |              |
          +--> ( Stop ) <+
```

Check: N = 153, D = 3, S = 1 + 125 + 27 = 153 = N, so it is an Armstrong number.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. An Armstrong number equals
   A. sum of its digits
   B. sum of its digits each raised to the power of the number of digits
   C. product of its digits
   D. its reverse
   Answer: B. 153 = 1^3+5^3+3^3. (Key point: Armstrong number)

2. The first part of the flowchart
   A. reverses N
   B. adds digits
   C. counts the digits
   D. prints result
   Answer: C. D counts digits. (Key point: Part 1)

3. 153 is Armstrong because S =
   A. 1+5+3 = 9
   B. 1*5*3 = 15
   C. 153 + 3
   D. 1 + 125 + 27 = 153
   Answer: D. S equals N. (Key point: Check)

4. Algorithms and flowcharts help because
   A. logic is checked before coding
   B. they remove the need to code
   C. they run programs
   D. they replace compilers
   Answer: A. Cheap to correct on paper. (Key point: Benefit)

## Related in Computer Programming

- [Algorithm and flowchart: distance between points](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgo-flowchart-distance) — Computer Programming, chapter 2
- [Armstrong number using recursion](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aarmstrong-recursive) — Computer Programming, chapter 6
- [Algorithm for numbers divisible by 9 not 6](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgo-flowchart-divisible-9-not-6) — Computer Programming, chapter 2
- [Check triangular number](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Atriangular-number) — Computer Programming, chapter 5
- [Algorithm and flowchart for largest](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgorithm-flowchart-largest-n) — Computer Programming, chapter 2
- [Algorithm and flowchart: quadratic roots](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Aalgo-flowchart-quadratic) — Computer Programming, chapter 2

## Related in other subjects

- [Why closed loop response is faster than open loop](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Acl-faster-than-ol) — Control Systems, chapter 1, asked 4×
- [True/false: feedback makes response faster](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Atf-feedback-faster) — Control Systems, chapter 1
- [Journal bearing design with film thickness check](https://www.bctengineer.com/question.md?key=semester_6%2Fmachine_design_i%3Ajournal-bearing-minimum-film-thickness) — Machine Design I, chapter 7
- [Random number properties; KS test algorithm](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-properties-ks-algorithm) — Simulation and Modeling, chapter 6
