Neco 2017 Computer Studies Question 31
Practice objective / multiple choice question 31 from the 2017 Neco Computer Studies examination.
A program reads an integer \(n\). It initialises \(sum = 0\) and then executes a loop for \(i\) from 1 to \(n\). Inside the loop, if \(i\) is odd, it adds \(i \times 2\) to \(sum\); otherwise it adds \(i \div 2\). What is the final value of \(sum\) when \(n = 7\)?
Answer Options
About This Question
This is Neco 2017 Computer Studies Question 31. It is one of the objective questions from the 2017 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.