Give output of the following function definitions and also write what mathematical operations they carry out
void test 2( int a, int b )
{
while (a != b)
{
if (a > b)
a = a-b ;
else
a = b-a;
}
System.out.println(a);
}
if 4 and 17 are passed to the function.
Answers
Answered by
0
Answer:
output = 13
Explanation:
as the numbers are 4 and 17, they are substracted 17-4 = 13
Similar questions