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
vodomira [7]
2 years ago
6

How many base cases are in the functionabove?

Computers and Technology
1 answer:
baherus [9]2 years ago
5 0

Answer:

The answer is (b). 1.

Explanation:

In the code there is only 1 base case .

the base case is as following:-

if(n==0)

return 0;

this is the base case.

Base case is the most important statement in the function that uses recursion because without base case the recursion calls will keep on going and we will get a run time error.

You might be interested in
One concern some users have about storing data or accessing applications in the cloud is .
andriy [413]

Answer:

Explanation:

Security is the primary concern about cloud computing. This is the main for many IT departments to refrain from using cloud computing. Some things that put the security of cloud computing to be concerned are: Theft or loss of intellectual property.

3 0
2 years ago
What do virtually all "phishing" emails have in common?
Arisa [49]
The name of your email/or dont have any name, asking for money, spelling mistakes, and sometimes a UNSUBSCRIBE button at the bottom of the email.
6 0
3 years ago
What can you do if brainstorming only gives you a small or incomplete idea?
Grace [21]

Answer:

D. All of the above

Explanation:

5 0
3 years ago
The following program draws squares recursively. Fill in the missing code. import javax.swing\.\*; import java.awt\.\*; public c
ExtremeBDS [4]

Answer:

The missing code to this question is g.

Explanation:

In this question firstly import packages. Then declaration of the class Test that inherits the JApplet. In this class, we declare the default constructor. In this constructor, we call the add function. Then we declare another class that is SquarePanel. This class inherits JPanel. In this class, we define a method that is paintComponent(). In this method, we define an integer variable. In this method, we perform calculations and pass it to another function that is displaySquares(). In this function, we pass the value as the arguments. So in question the missing code or argument is g.

8 0
3 years ago
Design and implement a program that reads a series of 10 integers from the user and prints their average. Read each input value
irina [24]

Answer:

Explanation:

The following program was written in Java. It creates a loop that asks the user for numbers. If it can convert it to an integer it accepts it and adds it to the sum variable otherwise it ouputs that it is not a valid number. Once all 10 integers are added it prints the Average of the values entered.

import java.util.ArrayList;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int count = 0;

       int sum = 0;

       while (count != 10) {

           System.out.println("Enter a number: ");

           String answer = in.nextLine();

           try {

               int intAnswer = Integer.parseInt(answer);

               sum += intAnswer;

               count += 1;

           } catch (NumberFormatException e) {

               System.out.println("Not a valid number.");

           }

       }

       int average = sum / count;

       System.out.println("Average: " + average);

   }

}

3 0
2 years ago
Other questions:
  • What is one way to maintain Internet safety? a) avoid interacting with people on the Internet. B) avoid giving out information a
    7·1 answer
  • How would a programming language that allows programs to run on any operating system be classified?
    11·1 answer
  • A complete traversal of an n node binary tree is a(n)____ "operation if visiting a node is O(1)for the iterative implementation
    5·1 answer
  • (3.01 MC)
    11·1 answer
  • Imagine that the following two lines of code are placed inside a
    11·1 answer
  • 1. provide at least 3 properties and 3 methods of the object computer.
    8·1 answer
  • Derive an expression for the boolean function L(a,c) whose output is 1 when the light would be on. Note that two of the switches
    9·1 answer
  • A human subject’s photographs show two catchlights in each eye that are unwanted by the photographer. What is the most likely ca
    12·1 answer
  • A ……………………………is used to verify the identity of a website and is issued to the owner of the website by an independent and recogni
    7·2 answers
  • Can someone please help me with this ,it is my assignment of technology and agriculture year 8
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!