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

 

srp4379@lausd.net > consecutiveOrder
prev  |  next  |  chance

boolean consecutiveOrder(int a, int b, int c). 3 numbers are consecutive if they are in ascending (increasing) numerical order and each successive number differs from the previous number by 1. Examples of consecutive numbers are: 1,2,3 or 9,10,11. Return true if the 3 numbers are in consecutive order.


consecutiveOrder(1, 2, 3) → true
consecutiveOrder(9, 10, 11) → true
consecutiveOrder(5, 6, 8) → false

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

boolean consecutiveOrder(int a, int b, int c) { }

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: 110

Copyright Nick Parlante 2017 - privacy