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]
3 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]3 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
You have been hired by a small company to install a backbone to connect four 100base-T Ethernet LANs (each using one 24-port hub
stich3 [128]

Answer:

I don't speak english

I don't speak english

7 0
3 years ago
How many types of window in Qbasic​
kirza4 [7]

Answer:

QBasic consists of two windows: Program Window: The window titled as 'Untitled' is the program window. It is the place where program/code is written. Immediate Window: The window below Program Window titled as 'Immediate' is the immediate window.

5 0
3 years ago
Evonka is listening to music from an online music provider (such as Pandora or Jango). She builds a list of music preferences, i
likoan [24]

Answer:

D. Crowdsourcing

Explanation:

Crowdsourcing can be defined as a collaborative process which typically involves completing a project (task) and solving a problem through a group of people (crowd) that are geographically dispersed over the internet.

Basically, crowdsourcing refers to an outsourcing technique which allows a project or task to be jointly completed by a group of people (crowd) such as volunteers or freelancers who are made to work remotely over the internet.

<em>In this scenario, an online music provider such as Pandora or Jango uses crowdsourcing for collaborative filtering, which helps define the list of songs available to listeners. </em>

7 0
3 years ago
What is computer?explain any five characteristic in short.​
miv72 [106K]

Answer:

computer is an electronic machine which work on the basic principle" ipo"(input process and output.

it's characteristics are

Accuracy

Computers perform calculations with 100% accuracy. Errors may occur due to data inconsistency or inaccuracy.

Diligence

A computer can perform millions of tasks or calculations with the same consistency and accuracy. It doesn’t feel any fatigue or lack of concentration. Its memory also makes it superior to that of human beings.

Versatility

Versatility refers to the capability of a computer to perform different kinds of works with same accuracy and efficiency.

Reliability

A computer is reliable as it gives consistent result for similar set of data i.e., if we give same set of input any number of times, we will get the same result.

4 0
3 years ago
Read 2 more answers
A domain account is one that is created on a Windows server domain controller (network) using (Describe Microsoft accounts)
Korvikt [17]

Answer:

s

Explanation:

3 0
3 years ago
Other questions:
  • The Active Directory Users and Computers tool can be used to:______.
    11·1 answer
  • Which of the following types of access controls do not describe a lock? (a)- Directive (b)- Physical (c)- Preventative (d)- Dete
    8·1 answer
  • What is needed to create a good problem statement?
    10·1 answer
  • Why is the keyboard arranged in the QWERTY style?
    6·2 answers
  • if you're using the paintbrush tool and want to change the color of the paint being used what should you change
    9·2 answers
  • The ability to anticipate and determine upcoming driving hazards and conditions are adversely affected
    14·1 answer
  • 2.
    8·1 answer
  • Your task is to implement a function replace_once(t, d), that takes a text t and a replacement dictionary d, and returns the res
    10·1 answer
  • Setting up a desktop computer for anAutoCADspecialist who needs a minimum of 125 GBram which operating system would be the best
    5·1 answer
  • The Uniform Electronic Transmission Act (UETA) a. declares that e-signatures are invalid. b. has only been adopted in a handful
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!