How do you create a program that will ask the user to enter 3 numbers that would display the largest

Posted by lobosagwan on Stack Overflow See other posts from Stack Overflow or by lobosagwan
Published on 2010-04-20T09:28:02Z Indexed on 2010/04/20 9:33 UTC
Read the original article Hit count: 147

Filed under:
|
|
int numbers;
int largestNum = 0;
Console.WriteLine("Enter numbers : ");
numbers=int.Parse(Console.ReadLine());
numbers = 0;
for (int i = 0; i < 3; i++)
{
    if (numbers[i] > largestNum)
}
Console.WriteLine("The largest number is : {0}", largestNum);
Console.ReadLine();

this is a similar code, the problem is how to ask the user to enter 3 numbers and display the largest number.

© Stack Overflow or respective owner

Related posts about c#

Related posts about loop