Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 570 Bytes

File metadata and controls

25 lines (16 loc) · 570 Bytes

Combination Calculator

This project calculates the number of combinations (selection of items) using the mathematical formula $C(n, r)$.

⚙️ Logic

The program uses the standard formula:

$$C(n, r) = \frac{n!}{r! \cdot (n-r)!}$$

  1. Factorial Function: Computes $n!$ iteratively.
  2. Combination Function: Applies the formula using the factorial results.

🚀 Example Output

Input: $n=4, r=2$

  • $4! = 24$
  • $2! = 2$
  • $(4-2)! = 2$
  • Calculation: $24 / (2 \times 2) = 6$
--- Kombinasyon Hesaplama ---
C(4, 2) isleminin sonucu: 6