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
How many residues separate amino acids that are stabilized by hydrogen bonds in α helices?.
irina [24]

The numbers of residues separate amino acids that are stabilized by hydrogen bonds in α helices is  3.6 amino acid residues.

<h3>Why are amino acids called residues?</h3>

The  Amino acids are known to be compounds that are said to be called residues if there is  two or more amino acids that are known to be bond with each other.

Note that the amino group on one amino acid is one that tends to interacts with the carboxyl group and as such  form a peptide bond.

Therefore, The numbers of residues separate amino acids that are stabilized by hydrogen bonds in α helices is  3.6 amino acid residues.

Learn more about amino acids from

brainly.com/question/2526971

#SPJ1

5 0
1 year ago
Viruses and Malware Complete the case project on page 82 of the textbook by researching two types of viruses, two types of malwa
Naddika [18.5K]

Hi, I provided you a general guide on how to go about your writing your research paper.

<u>Explanation:</u>

Note, the current APA (American Psychological Association) format is the <em>APA 7th Edition. </em>This format details how a researcher should state the findings, sources, conclusion, etc.

Hence, you can begin writing the assigned paper only after gathering the needed data.

6 0
3 years ago
Which of the following is an example of a stereotype?
amm1812

Answer:

d)"I have a really bad feeling about her. I don't know why."

Explanation:

5 0
2 years ago
Three periods after a menu item (...) mean that clicking that command will open
erastovalidia [21]

I think its B.) A dialog box


7 0
3 years ago
Read 2 more answers
Round 74,361 to the nearest 10​
grandymaker [24]

Answer:

74,400 i think

Explanation:

8 0
3 years ago
Other questions:
  • The arithmetic logic unit (alu) controls all of the functions performed by the computer's other components and processes all the
    7·1 answer
  • In which scenario would instant messaging be more useful than other forms of communication?
    10·1 answer
  • What is the chief ethical concern concerning all the new sources of data available through new technological means like internet
    9·1 answer
  • Which of the following statements is false? a. Each object of a class shares one copy of the class's instance variables. b. A cl
    11·1 answer
  • Tony is in charge of all presentations for a Fortune 500 pharmaceutical company. In addition to creating powerful and persuasive
    9·1 answer
  • Consider the following threats to Web security, and describe how each is countered by a particular feature of SSL.
    15·1 answer
  • echnician A says that underinflation can increase the rolling resistance of a tire. Technician B says that underinflation can ca
    9·1 answer
  • Assume that a function with this header: function amountSaved(price, discountRate, salesTaxRate) already exists. Write a single
    14·1 answer
  • How many binary digits does a single hexadecimal digit represent?
    13·1 answer
  • Please help me I don't understand. It's Python.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!