#Iwakk's reccurision test cases
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
this is a
program that i made
this code here
// Method to compute the sum of the digits of a number recursively
public int numSum(int n) {
if (n == 0) {
return 0;
}
return n % 10 + numSum(n / 10);
}
public int lucky7s(int n) {
if (n == 0) {
return 0;
}
int lastDigit;
lastDigit = n % 10;
if (lastDigit == 7) {
return 1 + lucky7s(n / 10);
} else {
return lucky7s(n / 10);
}
}
public int gobbet(String str) {
if (str.length() < 3) {
return 0;
}
char firstChar, thirdChar;
firstChar = str.charAt(0);
thirdChar = str.charAt(2);
String remainingString = str.substring(1);
if (firstChar == thirdChar) {
return 1 + gobbet(remainingString);
} else {
return gobbet(remainingString);
}
}
}```
was meant to run test cases for the length of iwakk's somethign something
@tepid olive
yo bro
fam
dog
dawg
we tryna get the mans in the crib ya fell me ayy?? ya blowing on me ting rn ma son? ya felling alr there? oh shi bruh the mans in his feeling rn ayyy?? yaa mannn the indians be making it smelly like the jelly i be whopping in math class just to take another lash ba my father
what's your question?
Please talk in civil english
Understandable
i was just tryna warm-up before my friend @tepid olive gets here
hes just a sloush when it comes to classic english poem righting
i actually took a class by the professor named "Mr.cityboyjj" from a university called york in the province in Canada called Ontario
Also please make sure it's an actual question thread where helpers can chip in, otherwise please use DMs.
yes that is true