ExamVeda
Login
Home
Operators and Expressions in C Sharp
?

What will be the output of the following C# code?
static void Main(string[] args)
{
    int a = 4;
    int b = 5;
    int c = 6;
    int d = 8;
    if (((a * b / c) + d) >= ((b * c + d ) / a))
    {
        Console.WriteLine("Line 1 - a is greater to b");
        Console.WriteLine((a * b / c) + d);
    }
    else
    {
        Console.WriteLine("Line 1 - a is not greater to b");
        Console.WriteLine((b * c + d )/ a);
    }
}

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.