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
MAXImum [283]
3 years ago
5

print out the last even number from an array of integers, if there is no even number, then print out a sentence indicating so.

Computers and Technology
1 answer:
den301095 [7]3 years ago
6 0

Answer:

See the sample algorithm below.

Explanation:

array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 22];

function last_even(arr) {

    for( i = arr.length-1; i >= 0; i--) {

         if (arr[i] % 2 == 0) {

              console.log(arr[i]);

              break;

         }

         else {

              console.log("There is no even number!");

         }

    }

}

last_even(array);

You might be interested in
A(n)<br> is a fast compute with lots of storage. pls help
Pachacha [2.7K]

Answer:

Surface Laptop 3 - 15", Platinum (metal), AMD Ryzen 5 3580U, 8GB, 128GB

4 0
3 years ago
Read 2 more answers
To restore a document to the default theme for the template on which the document is based, click the themes button, and then cl
PtichkaEL [24]
Depends on the program you are using

4 0
3 years ago
If you have columns that are truncating your content (not showing all the content), but you cannot increase the width of the wor
mezya [45]

Answer:

Use the Wrap text button

Explanation:

A wrapped cell allows users to insert text into cells in Excel without truncating the contents of the cell. This makes the data in this cell very easy to read.

Follow these steps to wrap your text:

  1. Click on the cell that you want to format
  2. On the Home tab, click the wrap text button
  3. Do all for all the cells affected.

The wrap text function will help to make the text visible without losing data.

4 0
3 years ago
Consider this query:
vlabodo [156]

Answer:

There is a table in the database named Teacher having columns Email, Expiry Month etc. this query is selecting the email address from the table Teachers on the basis of expiry month that is February.\  

Explanation:

4 0
3 years ago
Can someone help me with this trace table - its computer science
Rasek [7]

TThe while loop keeps going until count is greater than or equal to 10.

count = 0, sum = 0

count = 2, sum =2

count = 4, sum = 6

count = 6, sum = 12

count = 8, sum = 20

count = 10, sum = 30

Now that count is equal to 10, it exits the while loop and the program ends. The values above complete your trace table.

8 0
3 years ago
Other questions:
  • How can I sent a message?
    13·1 answer
  • Big Data often involves a form of distributed storage and processing using Hadoop and MapReduce.
    12·1 answer
  • Which of the below statements describes the purpose of HTML 5 - check as many as apply
    9·1 answer
  • Write a program to generate a square wave with 80% duty cycle on bit P2.7 Microprocessor.​
    7·1 answer
  • To bundle links together in order to improve bandwidth availability and redundancy, what protocol is used
    6·1 answer
  • What should you do in order to have access to the header and footer tools? Open the View tab. Open the Page Setup dialog box. Op
    6·1 answer
  • If an electric circuit has 30ohms and 10amps. How many volts the battery voltmeter should read?
    10·1 answer
  • In 5-10 sentences, describe the procedure for responding to an e-mail message.
    5·1 answer
  • What is ‘situational awareness” in game design?please answer in a full sentence!
    10·1 answer
  • 1. What is the difference between background sound and nat sound
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!