<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Bilisimogretmeni kombinasyon Hesabı</title>
<script type="text/javascript">
function hesapla() {
var n =parseInt(document.getElementById("ndegeri").value);
var r = parseInt(document.getElementById("rdegeri").value);
var fakt = n;//http://www.bilisimogretmeni.com
for (var i = n - 1; i >= 1; i--)
{
fakt = fakt * i;
}
var fakt2 = r;
for (var i = r - 1; i >= 1; i--)
{
fakt2 = fakt2 * i;
}//http://www.bilisimogretmeni.com
var number;
number = n - r;
fakt1 = number;
for (var i = number - 1; i >= 1; i--)
{
fakt1 = fakt1 * i;
}
fakt1 = fakt2 * fakt1;
kombinasyon = fakt / fakt1;
document.getElementById("sonuc").value = kombinasyon;
}
</script>
</head>
<body>
Kombinasyon hesaplaması için n ve r değerlerini girin<br />
n Değeri <input type="text" id="ndegeri" /><br />
r Değeri<input type="text" id="rdegeri" /><br />
<input type="button" value="Hesapla" onclick="hesapla()" /><br />
Sonuç <input type="text" id="sonuc" />
</body>
</html>
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.