Gce Model Questions Vol1 2019 Computer Studies Question 40
Practice objective / multiple choice question 40 from the 2019 Gce Model Questions Vol1 Computer Studies examination.
The following pseudocode is executed with a positive integer \(n\):\n\n````\nfor i = 1 to n\n for j = i to n\n if (j mod i == 0)\n k = k + 1\n````\nAssume each iteration of the inner loop (including the condition test) costs 1 time unit, and each time the condition is true an additional 1 time unit is spent for the increment. Derive a formula for the total number of time units as a function of \(n\) and then compute the total for \(n = 100\).
Answer Options
About This Question
This is Gce Model Questions Vol1 2019 Computer Studies Question 40. It is one of the objective questions from the 2019 Gce Model Questions Vol1 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.