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
Iteru [2.4K]
3 years ago
6

Write a recursive method in pseudo code that returns the number of 1's in the binary representation of n. use the fact that this

equal to the number of 1's in the representation of n/2, plus 1, if n is odd.
Computers and Technology
1 answer:
Deffense [45]3 years ago
4 0
Int count(int num)

if   num==0   return  0;
return   (n&1)+count (n/2)


You might be interested in
Explain how it is possible for a sequence of packets transmitted through a wide area network to arrive at their destination in a
dalvyx [7]

Answer:

- Different route paths, due to dynamic routing in WAN.

- Local area networks have one or very few paths to destination and does not require dynamic routing.

Explanation:

A wide area network is a network that covers a large geographical area. It goes beyond the private local area network, with more routing paths and network intermediate devices. The router is an essential tool for routing packets between devices. It requires a routing path, learnt statically or dynamically to work.

There are mainly two types of route paths, they are, static routes and dynamic routes.

The dynamic routes are used mainly in WAN. Sometimes, there can be multiple path to a destination, the router determines the best path to send the packets. It sends the sequenced packets through all available path and they arrive at the destination depending on the path used, the packets arrive in an out -of-order fashion in the destination and a rearranged.

5 0
3 years ago
Can a computer evaluate an expression to something between true and false? Can you write an expression to deal with a "maybe" an
Maurinko [17]

Answer:

yes a computer can evaluate expressions depends on the computer for the maybe expression

Explanation:

4 0
3 years ago
Read 2 more answers
3. Windows that are viewed as Web pages have<br> sections. **
tankabanditka [31]

Answer:

when the when the when the add the when are you is id god his gay for your top off jack dafe cafe read line green red whats the answer

Explanation:

8 0
3 years ago
Read 2 more answers
What did major networks do to combat audience erosion in the 1990s?
S_A_V [24]

Answer: I think is 3. They acquired cable channels. They acquired cable operators.

Explanation:

6 0
3 years ago
The expression that is tested by a switch statement must have a(n) __________ value.
Hitman42 [59]

The answer is relational.

6 0
3 years ago
Other questions:
  • Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followe
    13·1 answer
  • In this challenge, write a function to add two floating point numbers. Determine the integer floor of the sum. The floor is the
    8·1 answer
  • Concept about borderless classroom because of technology​
    9·1 answer
  • Dante needs to query a table to find all the references to a particular product and apply a 10%
    7·2 answers
  • What is "mob of the dead"?
    7·1 answer
  • PLEASE I NEED HELP FAST
    8·1 answer
  • Which of the following number is divisible by 3? (340 , 432 , 113)​
    7·1 answer
  • What are the common camera hazards? When might you encounter these hazards in your life, and what do you plan to
    14·1 answer
  • Hi am feeling really happy just passed a test after a lot of tries :-)
    5·1 answer
  • Which of the following offers a combination of the features of ram and rom?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!