![Advanced Placement (AP)](/tpl/images/cats/ap.png)
Advanced Placement (AP), 09.04.2021 20:40, nick607
Consider the following recursive method, which is intended to display the binary equivalent of a decimal number. For example, toBinary(100) should display 1100100.
public static void toBinary(int num)
{
if (num < 2)
{
System. out. print(num);
}
else
{
/* missing code */
}
}
Which of the following can replace /* missing code */ so that toBinary works as intended?
System. out. print(num % 2);
toBinary(num / 2);
A
System. out. print(num / 2);
toBinary(num % 2);
B
toBinary(num % 2);
System. out. print(num / 2);
C
toBinary(num / 2);
System. out. print(num % 2);
D
toBinary(num / 2);
System. out. print(num / 2);
E
![answer](/tpl/images/cats/otvet.png)
Answers: 1
Other questions on the subject: Advanced Placement (AP)
![image](/tpl/images/cats/ap.png)
Advanced Placement (AP), 23.06.2019 12:50, adeleinflores9402
Want free brainliest + free points? answer this correctly and i got you the majority of collisions are preventable through a. good defensive driving habits b. bad defensive driving habits c. good luck d. new technologies
Answers: 2
![image](/tpl/images/cats/ap.png)
Advanced Placement (AP), 25.06.2019 18:00, taylorannsalazar
Anew moon would be directly overhead at what time
Answers: 2
![image](/tpl/images/cats/ap.png)
![image](/tpl/images/cats/ap.png)
Advanced Placement (AP), 28.06.2019 02:30, cynayapartlow88
Read the sentence and type the correct answer in the box. kepler discovered that a planet does not orbit the sun at a constant speed. rather, at the point closest to the sun known as the perihelion, the planet’s speed is . very fast
Answers: 1
Do you know the correct answer?
Consider the following recursive method, which is intended to display the binary equivalent of a dec...
Questions in other subjects:
![Konu](/tpl/images/cats/fizika.png)
Physics, 21.08.2019 09:20
![Konu](/tpl/images/cats/istoriya.png)
History, 21.08.2019 09:20
![Konu](/tpl/images/cats/en.png)
English, 21.08.2019 09:20
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 21.08.2019 09:20
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 21.08.2019 09:30
![Konu](/tpl/images/cats/biologiya.png)