Answer:
f(N) = 2+ N/2 + 6N² units of time.
Step-by-step explanation:
Assigning 0 to the variable sum takes one unit of time.
Each time you increment sum by B, you need to call the value of sum, sum it to B and assign it to sum, which takes three units of time in total. You are repeating this process for each value of B which ranges from 1 to 4n and for each value of A which ranges from 1 to n/2. Opening the FOR takes also another unit of time, so, as a result, we have
f(N) 1 + 1 (open the FOR in A)+ N/2*(1 (open the FOR in B) + 4N*3) = 2+ N/2 + 6N² units of time. It has order complexity O(N²).
<span>Subtracting 2x from both sides of the equation would be a reasonable first step in solving this equation as it properly combines like terms to the left side of the equation. It quickly shows that the next step would be adding 1 to both sides of the equation, which would have us arrive at the answer of x = 5.</span>
The answer is 8
Order of operations:(Please Excuse My Dear Aunt Sally)
Parentheses
Exponents
Multiplication
Division
Add
Subtract
When it comes down to multiplication and division you do whichever comes first , left to right same with add and subtract so..
Step1: 2 squared = 4
Step2: 4/4=1
Step3: 1x10=10
18-10=8 . Final answer is 8
You can't multiply anything to get a prime number ?