What will be the output of the following C# code?
static void Main(string[] args)
{
int a, b, c, x;
a = 90;
b = 15;
c = 3;
x = a - b / 3 + c * 2 - 1;
Console.WriteLine(x);
Console.ReadLine();
}
static void Main(string[] args)
{
int a, b, c, x;
a = 90;
b = 15;
c = 3;
x = a - b / 3 + c * 2 - 1;
Console.WriteLine(x);
Console.ReadLine();
}
A. 92
B. 89
C. 90
D. 88
Answer: Option C
Related Questions on Operators and Expressions in C Sharp
What does the modulus operator (%) do in C#?
A. Increments the operand by 1
B. Returns the quotient of a division
C. Performs multiplication
D. Returns the remainder of a division
Join The Discussion