Course Solutions Uncategorized (Solved) : Php Normal Array Like Array 5 7 2 88 11 10 Multi Conditions Equation Input Number Even Ou Q35651122 . . . .

(Solved) : Php Normal Array Like Array 5 7 2 88 11 10 Multi Conditions Equation Input Number Even Ou Q35651122 . . . .

 

PHP

You have a normal array, like:

array(5, 7, 2, 88, 11, 10)

There is a multi-conditions equation, that are:

even 5x+12 odd 3x2

.

if the input number is even, the output will be 5*input+12

if the input number is odd, the output will be 3*square feet ofinput.

.

The previously declared array has the inputted numbers.

You should loop on the array using foreach,

and perform the equation using if statements

and produce an associative array, like:

array(input => output, … etc).

.

even 5x+12 odd 3×2 Show transcribed image text

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post