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
Which payment method typically charge is the highest interest rates?
jek_recluse [69]

The highest amount is Credit. The more you wait the higher the interest, higher the interest the more you pay, and no one wants to play more. Stay safe use debit as much as you can

8 0
3 years ago
Please write down your student id. take the last digit of your student id as m.
solmaris [256]
Now why in the world anyone would want to do that....



Really!!!!
7 0
3 years ago
How do you flash your high beams ?​
Bad White [126]

Answer: to flash your high beams you have to basically put on and turn them off really quickly here is what the button looks like :)

Hope this helps you out :)

7 0
3 years ago
Read 2 more answers
How are status reports useful
valentinak56 [21]

Answer:

Project managers use status reports to keep stakeholders informed of progress and monitor costs, risks, time and work. Project status reports allow project managers and stakeholders to visualize project data through charts and graphs.

5 0
3 years ago
What is analog computer?​
Evgen [1.6K]

Answer:

Analog computers are special purpose computer which can mesuare continuously changing data such as temperature, pressure, voltage,etc.

3 0
2 years ago
Other questions:
  • Which one of the following items would you be most likely to keep in a database ?
    8·1 answer
  • What is the maximum upload speed you can get on an isdl internet connection?
    9·1 answer
  • True / False<br> The exponent in floating point is stored as a biased value.
    9·1 answer
  • When a user inserts a PivotTable, where will it be inserted?
    15·1 answer
  • A provides legal protection for something an individual has created
    12·1 answer
  • Edhesive coding practice 3.4​
    13·2 answers
  • Which tool can be used to increase the space between a bullet point or a number and text?
    11·2 answers
  • The memory used by the CPU to temporarily hold data while processing is called _______. random access memory central processing
    5·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    13·1 answer
  • How does abstraction make programming languages easier to use
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!