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
Replace the underlines with the words in parentheses that follow: the ____ solves the ____ of a ____ by expressing an ____ in a
adell [148]

The programmer solves the problems of a user by expressing an algorithm in a programming language to make a program that can run on a computer.

5 0
4 years ago
Which is the best example of someone growing their network while in high-school?
Llana [10]

Answer:

C

Explanation:

3 0
3 years ago
Describe server processing of a post request. in the case of cgi processing, how does the server pass information to a cgi progr
Aneli [31]

CGI is the part of the Web server that can communicate with other programs running on the server.

<h3>What is The Common Gateway Interface? </h3>

The Common Gateway Interface (CGI) provides middleware between WWW servers and external databases and information sources. The World Wide Web Consortium (W3C) defined the Common Gateway Interface (CGI) and also defined how a program interacts with an HTTP (Hyper Text Transfer Protocol) server.

The body of the message is sent to the CGI program by the server through the stanard input pipe. Using the value of content_length, which indicates the length of the body, the CGI program can parse the input and obtain the values of the data entered by the user.

See more about CGI at brainly.com/question/12972374

#SPJ1

8 0
1 year ago
4.7 code practice question 1 Edhesive
laiz [17]

Answer:

Following are the code to this question:

for x in range(11, 21):#defining for loop that use range method that take two integer values

  print(x," ")#print value

Output:

11  

12  

13  

14  

15  

16  

17  

18  

19  

20  

Explanation:

In the given question, it is not clear that what question is asked about and by search I show above so, I try to help you hope you like it.

In the above-given python code, a for loop is declared that use an x variable with the range method, that uses two integer value, in which first value will start the loop and last value ends the loop, inside the loop print method is used, that print the value of the loop variable x.

3 0
3 years ago
A film company want to video animals in the wild acting naturally. They decide to
erik [133]

Answer:

y

Explanation:

g

5 0
2 years ago
Other questions:
  • What is something you can do to stay connected to the relationships in your life while we spend this time at home?
    13·1 answer
  • What is the most common way for computing systems and devices to authenticate a person’s identity? citi
    10·1 answer
  • How can you tell which of the policies in the security options folder have changed settings?
    10·1 answer
  • What is required to display content on transparencies?
    6·1 answer
  • What is the line tool used for in photoshop
    6·1 answer
  • Mohammed's parents learn that his classmates have
    7·2 answers
  • Would you expect all the devices listed in bios setup to also be listed in device manager? would you expect all devices listed i
    7·1 answer
  • Write a algorithm to attend birthday party​
    8·2 answers
  • Maya is preparing a presentation for her science class on how solar panels produce energy. Why would a
    11·2 answers
  • Any task done by software can also be done using computer hardware, and any operation performed directly by hardware can be done
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!