top of page
Click here to go to the home page of AskTheCode.

#Problem Solving2 in Java | AskTheCode

Team ATC

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;

}

}


Recent Posts

See All

Comments


bottom of page