using System;
class Program
{
static void Main()
{
int x, y;
Console.Write("Enter the value of x: ");
x = int.Parse(Console.ReadLine());
Console.Write("Enter the value of y: ");
y = int.Parse(Console.ReadLine());
if (x >= 2 * y)
{
Console.WriteLine("Yes");
}
else
{
Console.WriteLine("No");
}
}
}
You have 2 mistakes, both in the Input-reading. Your Logic and Output is correct.
1st: you were asking for Input. This is fine if the code is meant for a User, but not for an automated System that wants to have a very specific output.
2nd: you tried to read x and y in 2 lines. But they are given in the same line, meaning you only read 1 line and split it, so you can grab both x and y seperately.
fixed code:
using System;
class Program
{
static void Main()
{
//INPUT
int x, y;
string[] input = Console.ReadLine().Split(' ');
x = int.Parse(input[0]);
y = int.Parse(input[1]);
//LOGIC & OUTPUT
if (x >= 2 * y)
{
Console.WriteLine("Yes");
}
else
{
Console.WriteLine("No");
}
}
}