India’s Best Job Seekers and Training Platform Forums Java Problems set Write a method that takes in a positive integer…

  • Write a method that takes in a positive integer…

  • Akash 

    Administrator
    at

    Write a method that takes in a positive integer, return the number of 2s between 0 and the input number.

    If the input value given is 13, it should return 2 as the number 2 and 12 are between 0 and 13.

    If the input value given is 21, it should return 3 as the number 2,12 and 20 are between 0 and 21.

Log in to reply.

Original Post
0 of 0 posts June 2018
Now
KodNest Training New Batch is starting on 02nd November 2020. Attend one week free demo classes.Register Now

New Report

Close