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
mihalych1998 [28]
3 years ago
7

what advantage is procided by using a boolean found variable in a compound condition for a search loop

Computers and Technology
1 answer:
padilas [110]3 years ago
5 0

Answer:

- the notation while(!found) { ... } is semantically very clear

- you can initialize the found boolean as false

Explanation:

Within the while loop you will assign the compound condition to the 'found' variable. By initializing the variable with 'false' you ensure that the values used in the compound condition are valid.

Simplified example: read user input until 'Y' is pressed:

found = false;

while(!found) {

   userInput = readUserInput();

   found = (userInput == 'Y');

}

You might be interested in
A grade of B is worth Grade points<br><br><br> A) 3.0<br> B) 80<br> C)2.0<br> D)4.0
Elodia [21]

Answer:

I am pretty sure. In my view answer is 4.0

8 0
4 years ago
Read 2 more answers
What will happen to the tools and equipment, if it is not store propely?​
nikklg [1K]
This question doesn’t make any sense I guess it will rust
8 0
3 years ago
1. According to the Department of Commerce, _________ percent of single moms in the US qualified as poor.​
Allisa [31]

Answer:

. According to the Department of Commerce, 34.0% percent of single moms in the US qualified as poor.​

Explanation:

8 0
3 years ago
Which of the following is best practice to minimize the chance of infecting your mobile device with malware
lawyer [7]
U Can use an anti virus, or do daily malware scans in ur device
7 0
4 years ago
What is the easiest way to tame a dire wolf on Ark Survival Evolved?
Usimov [2.4K]

Answer:

Direwolves are large pack animals. ... Being carnivorous pack animals, Direwolves will likely attack on sight, so caution is advised. However, they do have the capability of being tamed, and are extremely loyal mounts once they are.

Explanation:

Taming and Feeding

You can tame a wolf by right clicking it with bones, and it could take anywhere from 1 to 6 bones. Black particles will appear each time you feed the wolf a bone, except for the last one, when you have tamed it, in which case there will be heart particles.

Happy to help...

7 0
3 years ago
Other questions:
  • Web pages with personal or biograpic information are called ​
    10·1 answer
  • The ____ provides access to the Internet may also be internal.
    14·2 answers
  • What is the output of the following Java code?int x = 1;do{System.out.print(x + " ");x--;}while (x &gt; 0);System.out.println();
    14·1 answer
  • How would you build a robot
    7·2 answers
  • If you face an investigation where dangerous substances might be around, you may need to obtain which of the following?
    13·2 answers
  • List any three importance of computer points​
    8·1 answer
  • How do I write a pseudocode algorithm to read a sequence of number terminated by the number 999 and print the sum of the positiv
    7·1 answer
  • Write a program that reads a file that contains only integers, but some of the integers have embedded commas, as in 145,020. The
    10·1 answer
  • 1. If you have the following device like a laptop, PC and mobile phone. Choose one device
    9·1 answer
  • In which ways can governments manipulate the media? Select 3 options.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!