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
kotegsom [21]
2 years ago
8

Write a recursive function num_eights that takes a positive integer pos and returns the number of times the digit 8 appears in p

os
Computers and Technology
1 answer:
nata0808 [166]2 years ago
7 0

Answer:

Explanation:

The following is written in Java. It creates the function num_eights and uses recursion to check how many times the digit 8 appears in the number passed as an argument. A test case has been created in the main method and the output can be seen in the image below highlighted in red.

  public static int num_eights(int pos){

       if (pos == 0)

           return 0;

       if (pos % 10 == 8)

           return 1 + num_eights(pos / 10);

       else

           return num_eights(pos / 10);

   }

You might be interested in
Help me asap ill give brainliest
kobusy [5.1K]

Answer:

Give me brainliest thanks

6 0
3 years ago
Which of the following is the fastest way to open an Access database? a. Right-click the database icon. b. Start Access from the
STALIN [3.7K]

Answer:

C. Double-click the database icon.

5 0
3 years ago
Read 2 more answers
An information system can enhance core competencies by
Nutka1998 [239]

Answer:

An information system can enhance core competencies by: encouraging the sharing of knowledge across business units.

Explanation:

Hope this helps you ! please mark me brainless

4 0
2 years ago
2. Name the three building blocks of design that pertain to form.
inna [77]

Answer:

Point, Line, Shape,Form, Color, Value, and Texture.

Explanation:

The elements of design, are the building blocks used by the designers to create the designs. ...

Point, Line, Shape,Form, Color, Value, and Texture.

3 0
3 years ago
Which of the following statements concerning a short in a series circuit is true?
Romashka [77]

Answer:

what is the answers it gave you?

6 0
2 years ago
Other questions:
  • Write a set of pseudocode instructions to feed a pet, using at least five steps?<br><br> Thank you!!
    6·1 answer
  • Consider the cement used for the foundation; the bricks and timber used for the walls; and the shingles used for the roof. All o
    5·1 answer
  • A tornado may be approaching if you observe which of the following?
    15·1 answer
  • Test Average and Grade
    12·1 answer
  • Analyze the following code. // Program 1: public class Test { public static void main(String[] args) { Object a1 = new A(); Obje
    5·1 answer
  • What is the purpose of OPPA<br>​
    13·1 answer
  • So I was looking at my profile and it says i'm a brainly PLUS member didn't sign up for it tho. Any ideas why this could have ha
    14·2 answers
  • Pride Group of Companies is making tremendous profits in different categories of electronic goods. The group of managers have to
    12·1 answer
  • E-banking is also called: [1]
    9·1 answer
  • Which statement correctly differentiates how to use list and table styles?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!