Blog

If n1 = 10, n2 = 21, n3 = 200 are passed by the user. Output of following code:

static void Main(string[] args){
int n1 = Convert.ToInt32(Console.ReadLine());
int n2 = Convert.ToInt32(Console.ReadLine());
int n3 = Convert.ToInt32(Console.ReadLine());

object res = n3 > n2 && n3 > n3 ? n3 : n1 > n2 || n1 > n3 ? n1 : Convert.ToInt32(“1”);

Console.WriteLine(res.GetType().ToString());
Console.WriteLine(res);
}