#Problem Solving2 in Java | AskTheCode

Problem in Java | Problem Solving | AskTheCode

Question:

Code:

public class countHydraHead{

public static void main(String[] args) {

int cut;

for (cut = 1; cut <= 28 ; cut++) {

headCount(cut);

}

System.out.println(cut);

}

static int headCount(int n){

int head = 1;

return head*2;

}

}


21 views0 comments

Recent Posts

See All

"Believe you can and you're halfway there"