Add each digit of a three digit number

Write a program to enter a three digit number and separately print the the digits of the number and add it and provide the implementation in C programming language.

Problem Statement

In this problem we will take an input of a three digit number number and separately print the digits and add them.

for example: 274
output
2
7
4
2+7+4=13

Solution

First we take an input of a three digit number from the user for example a and store it in int data type.

Then we will extract the digit in the hundre...

 •  0 comments  •  flag
Share on Twitter
Published on October 26, 2022 04:11
No comments have been added yet.