Solution to What is the value of k after the following code has been executed? k := … - Sikademy
Author Image

Archangel Macsika

What is the value of k after the following code has been executed? k := 0 for i1 := 1 to n1 for i2 := 1 to n2 . . . for im := 1 to nm k := k + 1

The Answer to the Question
is below this banner.

Can't find a solution anywhere?

NEED A FAST ANSWER TO ANY QUESTION OR ASSIGNMENT?

Get the Answers Now!

You will get a detailed answer to your question or assignment in the shortest time possible.

Here's the Solution to this Question

The value of k would be k=\sum\limits_{i_1=1}^{n_1} \sum\limits_{i_2=1}^{n_2}...\sum\limits_{i_m=1}^{n_m}1 =\sum\limits_{i_1=1}^{n_1} \sum\limits_{i_2=1}^{n_2}...\sum\limits_{i_{m-1}=1}^{n_{m-1}}n_m =\sum\limits_{i_1=1}^{n_1} \sum\limits_{i_2=1}^{n_2}...\sum\limits_{i_{m-2}=1}^{n_{m-2}}n_m \cdot n_{m-1}==...=\prod\limits_{i=1}^{m}n_i


Related Answers

Was this answer helpful?

Join our Community to stay in the know

Get updates for similar and other helpful Answers

Question ID: mtid-5-stid-8-sqid-4102-qpid-2801