Neco 2021 Computer Studies Question 37
Practice objective / multiple choice question 37 from the 2021 Neco Computer Studies examination.
The following pseudo‑code is executed with a positive integer \(n\):\n\n``\n k = 0\n for i = 1 to n\n for j = i to n\n if (j mod i = 0)\n k = k + 1\n end if\n end for\n end for\n``\n\n(a) Express the total number of times the statement `k = k + 1` is executed as a function of \(n\).\n(b) Using that expression, find the value of \(k\) when \(n = 12\).
Answer Options
About This Question
This is Neco 2021 Computer Studies Question 37. It is one of the objective questions from the 2021 Neco Computer Studies examination.
Difficulty level: Medium .
Master the Exam!
You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.