Computer Science, asked by swati0325, 5 hours ago

Pls solve fast.. Java.. Methods/Function​

Attachments:

Answers

Answered by lovesweet48200
0

Explanation:

State the output of the following program:

class Recur

{

public static void main(String args[ ])

{

int Result = result(10);

System.out.println("Result = " + Result);

}

static int result(int m)

{

if(m <= 2)

return m;

else

return m + result(m-2);

}

}

Similar questions