Guest User

Untitled

a guest
Jun 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1.  
  2. public function somar($n1, $n2, $operacao){
  3. switch($operacao){
  4. case "somar":
  5. $result = $n1 + $n2;
  6. break;
  7. case "subtrair":
  8. $result = $n1 - $n2;
  9. break;
  10. }
  11.  
  12. return $result;
  13. }
Add Comment
Please, Sign In to add comment