0% found this document useful (0 votes)
17 views4 pages

Java Function Output Calculation Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

Java Function Output Calculation Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3 and 7 |

enaidexthe ollauinq Cade aud ined theoutput a


wid diz plau int )

[Link] (x +
*
"
dioplan (a-1);
-
Syalameutpoint (2t " ");
Find the _eutput et the felloing funetiomhone m="seIENCE. P =5.
sid aeSing m, int p

Syoam. eut primHn (" ")


elo2

Syotem. eut. println ([Link](P)+")


tune (n, P-4);
Syotem. out. printlm (n. ehanAt (p))
3) 8hat sllthe funchon Cale) whun
she,mum e 324 22 nd
3

int Cale int num, int , int)

(mum< 10)
return mum
else

int 2 mum°/, 10

nehun z * + Cale (um/16 2, 9)


else
Teturn Z *y + Calc Mum/1o ^, I)
4) Find dhe Butput e thellouing code ha Aar,2)a u4,
int fanint a ipd b)

heturn O,
(b. 2 = = 0)

Tetun fun (ata, bl2)


reun fun (a +a , b/2) +

You might also like