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
valentinak56 [21]
4 years ago
9

Consider this program segment: int newNum = 0, temp; int num = k; // k is some predefined integer value 0 while (num > 10) {

temp = num % 10; num /= 10; newNum = newNum * 10 + temp; } System.out.println(newNum); Which is a true statement about the segment? I If 100 <= num <= 1000 initially, the final value of newNum must be in the range 10 <= newNum <= 100. II There is no initial value of num that will cause an infinite while loop. III If num <= 10 initially, newNum will have a final value of 0.
Computers and Technology
1 answer:
Doss [256]4 years ago
6 0

Answer:

All of these statements are true.

Explanation:

Since the while loop is reversing the integer number and leaving the highest order digit in the num and stores the reversed number in the newNum variable.

It skips one digit so if the num is in the range of [100,1000] it will result in a number between 10 and 100.

This loop can never go in infinite loop for any initial value of num because the loop will run as many times as the number of digits.

and if the value of the num is <=10 the while loop will never run and the value of newNum will be 0.

You might be interested in
Free Brainliest Here. i Also Have A Quiz for Brainliest So Check That Out To
AysviL [449]

Answer:nice

veru cool

Explanation:

7 0
3 years ago
Read 2 more answers
HOW MANY PROGRAMMING LANGUAGES SHOULD I LEARN TO MAKE A GAME LIKE AGAR.IO, SLITHER.IO ETC
maria [59]

Answer:

learn to make slither

Explanation:

it is such a cool game

also please can you heart and like my comment and rate it 5 stars please and give it brainliest pls i beg you thx !!!

8 0
3 years ago
You can use these finger motions to perform specific functions on a Mac OS system:
notka56 [123]

Answer:

Gestures

Explanation:

Gestures is the name of the Mac feature that makes these finger motions available to perform specific functions on a Mac OS system:

4 0
3 years ago
JAVA
Katarina [22]

import java.util.Scanner;

public class JavaApplication83 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter Strings: ");

       String word1 = scan.nextLine();

       String word2 = scan.nextLine();

       String newWord = "";

       if (word1.length() == word2.length()){

           for (int i = 0; i < word1.length(); i++)

           {

               newWord += word1.charAt(i) +""+word2.charAt(i);

           }

       

       }

       else{

           newWord = "error";

       }

       System.out.println(newWord);

   }

   

}

I hope this helps!

4 0
3 years ago
Which type of device would you most likely consider installing an SCSI disk in?
eimsori [14]

Answer:

You would install an SCSI disk in a server.

4 0
3 years ago
Other questions:
  • A college asks you to write about a novel that is meaningful to you. What should you include in this essay?
    10·1 answer
  • After you enter the details for the first selected recipient in the New Address List dialog box, click _______ to add another re
    9·1 answer
  • The first synthesizers were small simple machines that were easy to use. a. true b. false
    12·1 answer
  • Which of the following is the most significant outcome of the formation of the SMPTE?
    15·1 answer
  • The term "exception propagation" means:
    5·1 answer
  • Complete the code.
    12·2 answers
  • Convert FA23DE base 16 to octal<br>​
    6·2 answers
  • HURRY IM TIMED Note that common skills are listed toward the top, and less common skills are listed toward the bottom. According
    9·2 answers
  • Which type of data storage allows computers to read and write to the memory while the computer is powered on?
    15·1 answer
  • In query design view you can add .............. to limit the number of records shown in the resulting datasheet
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!