PRN211_-_REB5_-_FA_2023_1324.webp
B

PRN211_-_REB5_-_FA_2023_1324.webp

(Choose 1 answer)
record A
public int GetNumber() => 5;
}
record B: A
public dynamic Calc(){dynamic s = 0;
for (int i = 1; i <= GetNumber(); i += 2) {
s += i;
}
return s;
}
}
class Program {
static void Main(string[] args) {
B obj = new B();
var s = obj.Calc();
Console.WriteLine(-s);
}
} The output will be:
A 8
B. 9
C. 7
D. 0

1

Thông tin

Category
PRN211
Thêm bởi
bright_fortune
Ngày thêm
Lượt xem
1,948
Lượt bình luận
8
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRN211_-_REB5_-_FA_2023_1324.webp
File size
50.6 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom