From e7695dbccaf01e9db5285c0eefe3168c29088d3b Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 21:23:25 +0100 Subject: [PATCH] case combination --- src/main/c/Calculator/calculator.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index e29d35c..6576a95 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -113,6 +113,12 @@ int main() { scanf("%d %d", &n, &r); result = permutation(n, r); printf("Permutation of %d and %d: %lf\n", n, r, result); + break; + case 19: + printf("Enter n and r: "); + scanf("%d %d", &n, &r); + result = combination(n, r); + printf("Combination of %d and %d: %lf\n", n, r, result); break; case : printf("Exiting...\n");