Swift 3 Challenge 3

Datetime:2016-08-23 04:15:29         Topic: Swift          Share        Original >>
Here to See The Original Article!!!

Continuing our Swift 3 Challenges today’s challenge has to do with order.

Problem Description:

Given three ints, first, second, third, return true if

the second is greater than first, and third is greater than second.

However, with the exception that if the parameter “itsOk” is true,

second does not need to be greater than first but still better be less than third.

Test Cases:

Try this before you look at my solution.

Seriously – try it yourself.

Last chance.

Okay – here is my solution.

You can play with my code at the IBM Swift Sandbox.








New

Put your ads here, just $200 per month.