mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-06 17:29:31 +08:00
Add Tests for DigitalRoot Algorithm (#3186)
This commit is contained in:
@ -60,12 +60,6 @@ class DigitalRoot {
|
||||
} // n / 10 is the number obtainded after removing the digit one by one
|
||||
// Sum of digits is stored in the Stack memory and then finally returned
|
||||
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.println("Enter the number : ");
|
||||
int n = sc.nextInt(); // Taking a number as input from the user
|
||||
System.out.println("Digital Root : " + digitalRoot(n)); // Printing the value returned by digitalRoot() method
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user