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
marta [7]
3 years ago
7

Complete the following Programming Assignment using Recursion. Use good programming style and all the concepts previously covere

d. Submit the .java files electronically through Canvas by the above due date (In a zip file). This also includes: Requirements (for this problem), Pseudo-Code, UML, Java Doc(s) and an explanation, etc., which must be in the correct format. 9. Ackermann's Function Ackermann's function is a recursive mathematical algorithm that can be used to test how well a computer performs recursion. Write a method ackermann(m, n), which solves Ackermann's function. Use the following logic in your method: If m=0 then return n +1 If n = 0 then return ackermann (m - 1, 1) Otherwise, return ackermann (m - 1, ackermann(m, n - 1)) Test your method in a program that displays the return values of the following method calls: ackermann(0, 0) ackermann (0, 1) ackermann(1, 1) ackermann(1, 2) ackermann(1, 3) ackermann(2, 2) ackermann(3, 2)
Computers and Technology
1 answer:
Likurg_2 [28]3 years ago
6 0

Answer:

Explanation:

public class Ackermann {

   public static int ackermann's(int m, int n) {

       if (m == 0) {

           return n + 1;

       } else if (n == 0) {

           return ackermann's(m-1, 1);

       } else {

           return ackermann(m - 1, ackermann(m, n - 1));

       }

   }

   public static void main(String[] args) {

       System.out.println(ackermann(0, 0));

       System.out.println(ackermann(0, 1));

       System.out.println(ackermann(1, 1));

       System.out.println(ackermann(1, 2));

       System.out.println(ackermann(1, 3));

       System.out.println(ackermann(2, 2));

       System.out.println(ackermann(3, 2));

   }

}

1

2

3

4

5

6

7

29

Process finished with exit code 0

You might be interested in
Explain how you would insert graphics using your word-processing software.
scoundrel [369]
You can just drag and drop any picture into Microsoft word that you wish. And if it is to big you can resize with the arrows around the picture. 
5 0
3 years ago
The specific term for expediting the delivery of software by breaking a task into smaller increments is called
Ksivusya [100]
Rapid Application Development is the specific term
8 0
3 years ago
Answer: x = 3<br>#1 -2x + 5 = -31​
OLga [1]
#1 answer:X=-18
Mdkdkkdkdkdkkdkdkdk
3 0
3 years ago
Help i give 20 shekel
Verdich [7]

Answer:hacking a computer is all I know

Explanation:

8 0
3 years ago
Which of the following is NOT a best practice to protect data on your mobile computing device?
OleMash [197]

<u>Lock your device screen when not in use and require a password to reactivate</u> is not a best practice to protect data on your mobile computing device.

<h3>What is a mobile computing device?</h3>

Any device that was built using mobile parts, such as mobile hardware and software, is referred to as a mobile computing device. Portable devices that can function like a typical computing device in terms of operation, execution, and provision of services and applications are known as mobile computing devices.

Portable and handheld computing devices are other names for mobile computing devices.

Modern handheld devices that have the hardware and software needed to run common desktop and Web applications are generally referred to as mobile computing devices. Similar hardware and software elements found in personal computers, such as processors, random memory and storage, Wi-Fi, and an operating system, are also found in mobile computing devices. They are made specifically for mobile architecture and portability, which sets them apart from PCS.

Learn more about mobile computing devices

brainly.com/question/8189998


#SPJ1

4 0
1 year ago
Other questions:
  • Which of these devices must be installed in every indevidual computing device on the network
    14·1 answer
  • What happens when a returntype, even void, is specified as a constructor in Java?
    14·1 answer
  • cd to the directory called final that is located within my home directory. While viewing the file called mypasswd you notice tha
    12·1 answer
  • Consider the markets for monitors, USB drives, central processing units, and Microsoft’s Windows. Assume monitor manufacturers u
    7·1 answer
  • Neil holds a discussion session with his clients. He recommends the kinds of network topologies the clients should consider, acc
    9·1 answer
  • To play a sound during transitions select a sound from - - - - - - list​
    11·1 answer
  • Demonstrate the register addressing mode for the following instructions. Also what addressing mode belongs to these instructions
    11·1 answer
  • Use______ to format cells when they meet a certain criteria.
    13·1 answer
  • 1 point
    13·1 answer
  • Hello. I really need this done ASAP. Don't scroll down. JUst look please.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!