1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
olasank [31]
3 years ago
8

Refer to the method f: Public int f( int k, int n ) { if( n == k ) return k; else if( n > k ) return f( k, n - k ); else retu

rn f( k - n, n ); } What value is returned by the call f( 6, 8 )?
Computers and Technology
1 answer:
Debora [2.8K]3 years ago
5 0

Answer:

Returned value: 2

Explanation:

Public int f(int k, int n) {

   if (n == k)

       return k;

   else if (n > k)

       return f(k, n - k);

   else return f(k - n, n);

}

/////////////////////////////////////////////////////////////////////////////////////////

Trace of function calls,

f(6, 8)

f(k, n - k) -> (6, 2)

f(k - n, n) -> (4, 2)

f(k - n, n) -> (2, 2)

return k

You might be interested in
When an IPv6 device with no pre-configured IPv6 address powers up, it can calculate a global 128-bit IPv6 address for itself usi
RSB [31]

Answer:

True

Explanation:

IPv6 Is a later version of IP addresses, used to solve the problem of the limited number of IPv4 addresses in the network.

Just like IPv4, IPv6 can also is configured to a device statically and dynamically. Dynamic IPv6 configuration could be a stateless autoconfiguration SLAAC, a stateless DHCPV6 or a stateful DHCPV6.

The IPv6 address is configured with a prefix and a prefix length and a EUI generated 64 bit interface or a random interface id by the device.

8 0
3 years ago
What is a box with dotted border that holds a place for content on a slide called?
FinnZ [79.3K]

Answer:

Placeholders

Explanation: Placeholders are boxes with dotted borders that hold content in its place on a slide layout. Slide layouts contain different types of placeholders (for example, for text, pictures, videos, and more). You can change a placeholder by resizing or repositioning it on a slide layout. You can also delete a placeholder.

7 0
2 years ago
How do you activate a sim card in an HP probook 6470b and what drivers are needed​
UNO [17]

[YOU NEED A SIM CARD TRAY, IF A DRIVER IS NEEDED IT WILL TELL YOU AND JUST LET YOU INSTALL IT]

-Ensure the device is powered off.

-From the left edge of the device, remove the card tray. ...

-With the gold contacts facing down and the notch located in the lower-right, insert the SIM card into the tray as shown. ...

-Insert the card tray.

8 0
2 years ago
true or false : The incorrect attitude towards driving is the cause of most collisions among teenage drivers.
natulia [17]
That is true your state of mind is what matters most 

4 0
2 years ago
Read 2 more answers
In the circuit shown in the figure above, what will happen when switches S1 and S3 are both closed? 
sp2606 [1]

Well, ya see, we need to have the picture of the circuit.

8 0
2 years ago
Other questions:
  • Trevor got home from work and suddenly realized that he needed to edit a certain file stored in the company network's server. ho
    11·1 answer
  • Select all examples of proper keyboarding technique.
    15·2 answers
  • Please help me with this! I’m using Python 3
    12·1 answer
  • What is one of the main problems that can occur when implementing a large number of new systems within an organization?
    7·1 answer
  • What is force? what are the types of force ? Explain all with suitable examples<br>​
    13·1 answer
  • Footnotes and endnotes can be used to explain information in more detail, add opinions or comments, or to cite sources in the do
    7·1 answer
  • the part of the computer that contains the brain , or central processing unit , is also known the what ?
    12·1 answer
  • What is your favorite LEGO set
    5·2 answers
  • What is the role of the memory in a computer ​
    11·1 answer
  • Laptop computers use PCMCIA cards, another type of ________
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!