id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

sspiege3@schools.nyc.gov > countDescending
prev  |  next  |  chance

Given an int start and an int end, return the amount of integers that are descending between the numbers, inclusive. Hint: Copy and paste your previous isDescending method below your countDescending method. Example: (13, 16) would return 0 since no numbers between 13 and 16 are descending. Example: (20, 29) would return 2 since 20 and 21 are descending.


countDescending(10, 30) → 4
countDescending(11, 19) → 0
countDescending(20, 42) → 8

...Save, Compile, Run (ctrl-enter)

public int countDescending( int start, int end) }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 200

Copyright Nick Parlante 2017 - privacy