# PHP3 ## 01 De Som ### De Som van drie getallen De functie krijgt drie waarden en returned de som van de drie getallen (dus de drie input variabelen opgeteld).
**Input** | **Output** |
mijnFunctie(3,2,1) | 6 |
mijnFunctie(1,12,3) | 16 |
mijnFunctie(0,4,0) | 4 |
mijnFunctie(7,0,3) | 10 |
mijnFunctie(0,0,0) | 0 |
**Input** | **Output** |
mijnFunctie(3,2,1) | 6 |
mijnFunctie(1,12,3) | 16 |
mijnFunctie(0,4,0) | 0 |
mijnFunctie(7,0,3) | 0 |
mijnFunctie(0,0,0) | 0 |
**Input** | **Output** |
mijnFunctie(3,2,1) | 0 |
mijnFunctie(1,12,3) | 1 |
mijnFunctie(0,4,0) | 0 |
mijnFunctie(7,0,3) | 1 |
mijnFunctie(0,0,0) | -1 |
**Input** | **Output** |
mijnFunctie( \[3,2,1\] ) | 6 |
mijnFunctie( \[1,12,3,1,2\] ) | 19 |
mijnFunctie( \[1,12,3,1,2,1\] ) | 20 |
mijnFunctie( \[2,4\] ) | 6 |
mijnFunctie( \[4\] ) | 4 |
Uitslag | Resultaat | Punten |
1-3 | verloren | 0 |
4-0 | gewonnen | 3 |
0-0 | gelijk | 1 |
1-1 | gelijk | 1 |
0-2 | verloren | 0 |
Input | Punten |
\[ \[1,3\], \[4,0\], \[0,0\] ,\[1,1\],\[0,2\] \] | 5 |
\[ \[1,1\], \[0,0\], \[0,2\] ,\[1,1\],\[0,2\] \] | 3 |
\[ \[1,1\], \[0,0\], \[0,0\] ,\[1,1\],\[2,2\] \] | 5 |
\[ \[1,0\], \[1,0\], \[2,0\] ,\[1,1\],\[0,2\] \] | 10 |
Input | Output |
swap(\[1,2\]) | \[2,1\] |
swap(\[4,2\]) | \[2,4\] |
swap(\[1,1\]) | \[1,1\] |