Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- */
- import java.util.Scanner;
- public class AssignmentQuestion3 {
- static int bunnyCounter=0;
- public static void main(String[] args){
- Scanner sc=new Scanner(System.in);
- int a=sc.nextInt();
- bunnyEars(a);
- System.out.print(bunnyCounter);
- }
- public static void bunnyEars(int x){
- if(x>0){
- bunnyCounter+=2;
- bunnyEars(x-1);
- }
- }
- }
Add Comment
Please, Sign In to add comment