City Guilds Model Questions Vol1 2022 Information Technology Question 27

Practice objective / multiple choice question 27 from the 2022 City Guilds Model Questions Vol1 Information Technology examination.

City Guilds Model Questions Vol1 2022 Information Technology Objective / Multiple Choice Hard Difficulty
Question 27 CITY_GUILDS_MODEL_QUESTIONS_VOL1 • 2022 • INFORMATION_TECHNOLOGY • objective

Consider the following pseudocode, where \(N\) is a positive integer:\n\n``` S = 0 for i = 1 to N: for j = 1 to i: if (i*j) mod 3 = 0: S = S + i - j else if (i + j) mod 5 = 0: S = S - (i + j) else: S = S + 1 ```\n\nIf \(N = 10\), what is the final value of \(S\) after the program terminates?

Answer Options

A. 24
Correct Answer B. 28
C. 30
D. 26
Correct Answer
B
Correct Option:
28

About This Question

This is City Guilds Model Questions Vol1 2022 Information Technology Question 27. It is one of the objective questions from the 2022 City Guilds Model Questions Vol1 Information Technology examination.

Difficulty level: Hard .

Master the Exam!

You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.

Unlock Full Access Available for Android & Windows
Chat with Support