Add Tests for DigitalRoot Algorithm (#3186)

This commit is contained in:
Ankush Banik
2022-07-12 11:59:49 +05:30
committed by GitHub
parent 199c85d191
commit b2f6827c36
2 changed files with 20 additions and 6 deletions

View File

@ -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
}
}
/**