0
Why 30?
Explain, please, on your fingers, why the output is 30. https://code.sololearn.com/cDcb4tGHpD1i/?ref=app
5 ответов
+ 4
func( func(x, y), func(x, y) )
add( add(5, 10), add(5, 10) )
add(5, 10) = 15
add(15, 15)
15 + 15 = 30
+ 2
Михаил , there are nested functions in this example. The result comes after replacing add(add(5, 10), add(5, 10)) => add(15, 15) => 30.
+ 1
Your x and y takes the value of the sum of a and b which is 5+10= 15.
So "x+y" gives 15+15= 30.
+ 1
TheWh¡teCat 🇧🇬 thanks