Last active
January 10, 2018 23:20
-
-
Save lahmacun/44c8dcf6a84aeb52d6823208f1bd293f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function topla() { | |
$toplam = 0; | |
$argumanSayisi = func_num_args(); | |
for ($i = 0; $i < $argumanSayisi; $i ++) { | |
$toplam += func_get_arg($i); | |
} | |
return $toplam; | |
} | |
function carpma() { | |
$carpim = 1; | |
$argumanSayisi = func_num_args(); | |
for ($i = 0; $i < $argumanSayisi; $i ++) { | |
$carpim *= func_get_arg($i); | |
} | |
return $carpim; | |
} | |
// Ornek Kullanim | |
// echo carpma(2, 3, 4); // 24 dondurur |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment