0

Function

hello, is it possible to function a - function b? like : int functiona(int d, int e) { return (d+e); } int functionb(int f, int functiona) { return (f-functiona); }

12th Dec 2017, 2:53 AM
Dermawan Adji Saputra
Dermawan Adji Saputra - avatar
4 odpowiedzi
+ 3
Hmmm, maybe something like this? https://code.sololearn.com/cMmGqZtRsP3Q/?ref=app
12th Dec 2017, 9:26 AM
blackcat1111
blackcat1111 - avatar
+ 2
Do you mean f - functiona(d, e)? If so, then you could. But I don't see much point passing a function as an argument to functionb (considering you could just call functiona in functionb anyway. That being said, the above code would be an error considering you didn't specify the parameters of the functiona call in functionb, unless you specify default perimeters for functiona. Hope this helped! 😉
12th Dec 2017, 3:39 AM
blackcat1111
blackcat1111 - avatar
+ 1
so what can i do for my code?
12th Dec 2017, 9:21 AM
Dermawan Adji Saputra
Dermawan Adji Saputra - avatar
0
thankyou blackcat1111 you really helped me
12th Dec 2017, 9:43 AM
Dermawan Adji Saputra
Dermawan Adji Saputra - avatar