"Write pseudocode that outputs the contents of parallel arrays. You do NOT have to write the entire program. The first array will hold phone numbers The second array will hold company names You do NOT need to load the arrays. Your code can assume they are already loaded with data. The arrays are named phone[ ] and company[ ] Output the phone number and associated company name for every entry in the array."

Answers

Answer 1

Answer:

Check the explanation

Explanation:

PSEUDO CODE:

for(int i=0,j=0;i<phone.length,j<company.length;i++,j++)

{

print(phone[i]," - ",company[j]);

}

this for loop will print each phone number associated with the company names.


Related Questions

Rewrite this if/else if code segment into a switch statement int num = 0; int a = 10, b = 20, c = 20, d = 30, x = 40; if (num > 101 && num <= 105) { a += 1; } else if (num == 208) { b += 1; x = 8; } else if (num > 208 && num < 210) { c = c * 3; } else { d += 1004; }

Answers

Answer:

public class SwitchCase {

   public static void main(String[] args) {

       int num = 0;

       int a = 10, b = 20, c = 20, d = 30, x = 40;

       switch (num){

           case 102: a += 1;

           case 103: a += 1;

           case 104: a += 1;

           case 105: a += 1;

           break;

           case 208: b += 1; x = 8;

           break;

           case 209: c = c * 3;

           case 210: c = c * 3;

           break;

           default: d += 1004;

       }

   }

}

Explanation:

Given above is the equivalent code using Switch case in JavaThe switch case test multiple levels of conditions and can easily replace the uses of several if....elseif.....else statements.When using a switch, each condition is treated as a separate case followed by a full colon and the the statement to execute if the case is true.The default statement handles the final else when all the other coditions are false
Other Questions
How is a niche different than a habitat?A habitat is more than a physical place; it's a species' role in a specific place and it can change from niche to niche.A niche is more than a physical place; it's a species' role in a specific place and it can change from habitat to habitat.A niche and a habitat are the same.A niche is just a physical place; a habitat is a species' role in a specific place. Select the table that represents a linear function. Name the values represented by the box plot.Lower quartile:Upper quartile:Median: Please help me!! I don't get this question! I will mark Brainliest!Circle A has a diameter of 4 inches, a circumference of 12.56 inches, and an area of 12.56 square inches. The diameter of circle B is 2 inches, the circumference is 6.28 inches, and the area is 3.14 square inches. SHOW ALL STEPS.Part A: Using the formula for circumference, solve for the value of pi for each circle. (10 points)Part B: Use the formula for area and solve for the value of pi for each circle. (10 points)Part C: What observation can you make about the value of pi for circles A and B? (10 points) A skateboard manufacturing company has had problems with the wheels on its skateboards cracking and causing injuries. An engineer for the company knows of a material that he thinks will make the skateboards safer. What would be the best step for the engineer to take next?He should publish a report about the innovation and its impact on public safety.He should conduct tests using computer models to determine the safety impact.He should immediately begin producing all skateboards with the new material.He should convert production of half of the skateboards to use the new material. Explain what is happening to air mass from the sea as it moves up the side of the mountain and down the other side. Please help me out! i have a few more of these questions, about 5 Which layer best represents the mantle?A. 1B. 2C.3D.4 This diagram shows a baseballs motion. Which statement is best supported by the diagram? aMaximum Gravitational potential energy is at point R. bKinetic energy becomes potential energy between points P and Q. cKinetic energy becomes potential energy between points R and S. dMaximum kinetic energy is at point R. Jessica bought the ingredients to make chicken soup, and wanted to make a double batch, which would be 18 cups of soup. A quick Google search told her that this was 259.9 cubic inches. She hoped the soup pot below would be big enough. The soup pot is 9 inches tall with a radius of 3.5 inches. What is the volume of the soup pot? Answer choices are rounded to the nearest tenth cubic inch. 169.6 cubic inches 890.6 cubic inches 197.9 cubic inches 346.4 cubic inches Pedro has determined that the probability his shot will score in a lacrosse game is 0.30. What is the probability that he will score on two consecutive shots? 0.09 0.15 0.30 0.60 Jillian has three different bracelets (X, Y, and Z) to give to her friends as gifts in any order she prefers. If bracelet Y is chosen first, in how many ways can Jillian give out the bracelets? 1 2 3 4 Qu aprenden ustedes en la escuela? *A. S, aprendo.B. Aprendemos muchas cosas en la escuela.C. Aprenden muchas cosas en la escuela. What is the measure of STR Ben makes $39,600 a year. What the maximum amount he can afford for a mortgage each month ? Which of the following represents an example of synthesis?Creons change of heart toward the burial of PolyniecesOdysseuss deception of the CyclopsPerseuss rescue of AndromedaJunos transformation of Io A CONE IS 1/3 OF A CYLINDER, SO THE VOLUME FORMULA IS 1/3 THE CYLINDER. What is the approximate area of a circle with diameter 6? PLEASE HURRY !Choose the item that best matches the verb givensentarsela navajael saco de dormirla butacael espejola camisael champel cepillo para los dientesel nombreNetel cerealla pastilla de jabn Can someone explain to me how to do itShow me an example please? Match the time period with the correct layer of fossils (mya = millions of years ago). ITEM BANK: Move to Bottom 175 mya250 mya400 mya 175 mya 0