anonymous
  • anonymous
Consider the following algorithm. x ← 1 for i is in {1, 2, 3, 4} do for j is in {1, 2, 3} do x ← x + x for k is in {1, 2, 3, 4, 5, 6} do x ← x + 1 x ← x + 5 Count the number of + operations done by this algorithm.
Mathematics
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions.

anonymous
  • anonymous
Consider the following algorithm. x ← 1 for i is in {1, 2, 3, 4} do for j is in {1, 2, 3} do x ← x + x for k is in {1, 2, 3, 4, 5, 6} do x ← x + 1 x ← x + 5 Count the number of + operations done by this algorithm.
Mathematics
schrodinger
  • schrodinger
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your free account and access expert answers to this
and thousands of other questions

ChillOut
  • ChillOut
Each outside loop will run the insider loop for every iteration. the "k" loop is inside the "j" loop, which in turn is inside the "i" loop. As it turns out, for every iteration of "j", we will have 1 + (6*2) = 13 operations. As we have 3 "j" iterations, this gives 39 "+" operations for each "i" iteration. So, for 4 "i" iterations, we have 4*39 = 156 "+" operations.
anonymous
  • anonymous
got it!! the answer is 60
ChillOut
  • ChillOut
How's it? Please give your solution.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
value of i = 4 for j = 3 for k = 6 x 2 4(3 + (6x2)) =60
anonymous
  • anonymous
i don't know if it makes sense. but I got it right!
ChillOut
  • ChillOut
Nope. I just tested it. Check it at http://ideone.com/GsQ3pj You should be able to understand. The program output is Success time: 0 memory: 3096 signal:0 156
ChillOut
  • ChillOut
Do you understand any programming languages?

Looking for something else?

Not the answer you are looking for? Search for more explanations.