Programming Task Digital Root

ferenc-hechler
32 views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Programmingtask Digital Root

For a given number N calculate the Digital Root.

The Digital Root is calculated by summing up all digits of a number. E.g. 2025 has a Digital Root of 9 because 2+0+2+5 = 9

Implement the method solution(N) in the code below. Chose the programming language of your choice (Python, Java, C, ...) and click on the "Run" Button below the code to start the testscases.

Constraints: 0 ≤ N ≤ 1000000000

PYTHON

JAVA

C

C++

Node.JS

C#

GO

BASH

VB.NET

Kotlin

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content