Today is the 838th day of learning programming with a slightly cold rain!
Hello, everyone! This is the GESP Level 1 Exam for June 2025 questions.
Day 838


GESP Level 1 Exam for June 2025
Question 12: The following C++ code is used to find all factors of N (i.e., numbers that can divide N evenly). For example, if the input is 12, the output will be 12, 6, 4, 3, 2, 1.

A. i -= 1
B. i == 1
C. i > 1
D. i >= 1
Answer: C
START OF SPRING
Solution: This question tests how to print all factors of a number in C++.
It is clear that the factors are printed in reverse order. However, it is important to note that there is a printf(“1”) statement outside the while loop. Therefore, the correct choice is C, i > 1. Option D cannot be chosen.

20
25
9

SEPTEMBER
Day
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
1
10th
2
11th
3
Victory Day of the War of Resistance
4
13th
5
14th
6
Ghost Festival
7
White Dew
8
17th
9
18th
10
Teachers’ Day
11
20th
12
21st
13
22nd
14
23rd
15
24th
16
25th
17
26th
18
September 18 Incident
19
28th
20
29th
21
30th
22
August
23
Autumn Equinox
Harvest Festival
24
3rd
25
4th
26
5th
27
6th
28Class
7th
29
8th
30
Martyrs’ Memorial Day
@Xiumi
Slightly Cold Rain
Open Wisdom Station
