Algorithm to Find the Sum of Individual Digits of a 3-Digit Number
Subject: PPS (Programming for Problem Solving)
Contributed By: Sanjay
Created At: February 3, 2025
Question:
Write an Algorithm to Find the Sum of Individual Digits of a 3-Digit Number
Explanation Video:

Explanation:
Algorithm:
Start.
Read a 3-digit number n.
Extract digits:
d1 = n / 100.
d2 = (n / 10) % 10.
d3 = n % 10.
Calculate sum = d1 + d2 + d3.
Print the sum.
Stop.