Severity: Warning

Message: count(): Parameter must be an array or an object that implements Countable

Filename: controllers/calculator.php

Line Number: 37

- 1-800-665-6601
- info@tutorpace.com

given number of items. ‘n’ stands for the number of items and ‘r’ stands for the number of items we have to

pick. ‘nCr’ is the number of possible ways of choosing ‘r’ items from ‘n’ items. nCr calculator is the online tool

which can calculate ‘nCr’ value.

Given n = 6 and r= 2

Applying the above formula, we get -> nCr = 6!/ [(4!* (4- 2)!]

6! = 6 * 5 * 4 * 3 * 2 * 1

Similarly 2! = 2 * 1 and -> 4! = 4 * 3 * 2 * 1

Cancelling the common factors, we get

ways can we pick 3 candies?

Given n = 5 and r= 3

Applying the above formula, we get-> nCr = 5!/ [(3!* (5 - 3)!]

5! = 5*4*3*2*1

Similarly 2! = 2* 1 and-> 3! =3* 2* 1

Cancelling the common factors, we get

Hence there are 10 ways of picking 3 out of 5 candies.