Q49.webp
Lucy_boy1

Q49.webp

Kizspy Question: 49
(Choose 1 answer)
Analyze the following C# code and determine what it does. What will be the output if the input list is {1, 2, 3, 4,
5}?
List<int> numbers new List<int> {1, 2, 3, 4, 5};
for (int i = numbers.Count - 1; i >= 0; i--)
{
if (numbers[i] % 2 == 0)
}
numbers.RemoveAt(i);
foreach (int number in numbers)
Console.WriteLine(number);
A. 1, 3, 5
B. 2,4
C. 1, 2, 3, 4, 5
D. 1, 3, 4, 5

Thông tin

Category
PRU212
Thêm bởi
Lucy_boy1
Ngày thêm
Lượt xem
2,860
Lượt bình luận
13
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom