(Choose 1 answer)
record A {
(int x, int y) values = (0, 0);
public A(int x, int y) => values = (x, y):
public void Print(){
varr = Sum(values.x, values.y):
Console.WriteLine($"{r}");
int Sum(int a, int b){
var s = 0;
for (int i = a; i < b; i++){
s += i;
}
return s;
}
}
}
class Program{
static void Main(string[] args){A obj = new A(1.5):
obj.Print():
}
} The output will be:
A. 0
B. 6
C. 10
D. An exception will be thrown
R
26/50-CAP
Q: 28