Computer Science, asked by shootingstar42, 5 hours ago

Please answer this and no spam.​

Attachments:

Answers

Answered by Aditya4111Upadhyay
0

Answer:

1 : 500

2500

2 : 3100

5100

3 : 5900

7900

Explanation:

The explanation is down as how the computer will perform this task:

  1. It will consider C as 1, 2 & 3.
  2. Add a punctuation sign as we told it to print.
  3. Now there is a complexity in SUM:
  • First it will print as 0(SUM) + 1(L1[C])
  • Then it will consider C then colon and then 1 and will print it with its indexed valued after a colon.
  • The above process will be looped till the C is considered as 3 as it is in the for loop.
  • Then it will consider SUM as 500(SUM, computer considered before) + 200(L1[0]) and multiply it with 10.
  • The above process' answer will be 2500 and will be printed after 1 : 500.
  • Again it will be looped until C is 3.
  • We will finally get the anwer which is given above.
Similar questions