We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9efb72 commit c8e192eCopy full SHA for c8e192e
src/com/raj/AddDigits.java
@@ -35,6 +35,7 @@ public static void main(String[] args) {
35
System.out.println("The sum of the provided digit to the one digit is: " + num);
36
}
37
38
+ // Recursive function to call itself until it gets the answer in one digit.
39
private static int provideTotalToOneDigit(int num) {
40
int ans = 0;
41
if (num < 10) {
0 commit comments