PRN292c_-_FA_2023_-_2_1241.webp
M

PRN292c_-_FA_2023_-_2_1241.webp

Answer (Choose 1 answer)
What is the output of the following code?
class Test
{
int x, y;
public Test() { x = 1; y = 5; }
public int Sum() {
int s = 0;
for (int i = x; i <= y; i++)
{
}
s += i;
return s;
} static void Main(string[] args){
Test obj = new Test();
Console.WriteLine(obj.Sum());
}
}
A. 15
B. 10
C. 16
D. 11


Elt

Thông tin

Category
PRN292c
Thêm bởi
Minh Nhật1
Ngày thêm
Lượt xem
94
Lượt bình luận
1
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRN292c_-_FA_2023_-_2_1241.webp
File size
64.4 KB
Dimensions
1926px x 906px

Share this media

Back
Bên trên Bottom