Hello, I’m working on this task:

Your program should read two integers each from the prompt. Then, it should output the sum, difference, product, and quotient of those numbers. If the second number is zero, the program should output the sum, the difference, and the product, but instead of the quotient, it should print “Can’t divide by zero!”
Example 1:
>12
>4
16
8
48
3

Example 2:
>12
>0
12
12
0
Can’t divide by zero!

Here is my code:

``````
{
class MathOperations
{
static void Main(string[] args)
{
// Write your code hereYour program should read two integers each from the prompt. Then, it should output the sum, difference, product, and quotient of those numbers. If the second number is zero, the program should output the sum, the difference, and the product, but instead of the quotient, it should print "Can't divide by zero!"

Console.WriteLine(a + b);
Console.WriteLine(a - b);
Console.WriteLine(a * b);

if (b != 0)
{
Console.WriteLine(a / b);
}
else
{
Console.WriteLine("Sorry, can't divide by zero!");
}
}
}
}

``````

This code runs in VS Code, and I’m not sure what the issue is with CodeEasy. Any thoughts?

You are forgetting quotient, quotient needs to be added like the explained information above the code. It would also help if you don’t put console.WriteLine above the two int.Parse for a and b

The quotient is in the if statement, because we needed to test if it was equal to 0 or not