Twitter

Thursday, March 20, 2014

Free Response Hint for Friday's APCS Quiz

//this method will return the number of numbers in array
//that are less than the number 20


public int lessThanTwentyCount(int[] array)
{



   int count=0;
   for(int spot=0; spot<array.length; spot++)
   {
      if(array[spot]<20)
        count++;


   }
   return count;






}


No comments:

Post a Comment