# Write a program that find the smallest number

## Write a program that determines which three numbers entered is the smallest.

Algorithm for the three Numbers:

1. Go to File, New -> Project, select window Classic Desktop ->Console App (.net Framework).
2. Console App created.
3. Start writing a code of these three numbers below the static void and in between the middle bracket.
4. Take three number for declare the smallest number.
5. To Apply the If/Else logic.
6. Find the smallest number from the three numbers.
7. Display the smallest number.
8. Code is shown below.

## C# Program Code:

```using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApp10
{
class Smallest
{
public static void Main()
{
int n1, n2, n3;
Console.WriteLine("Enter Three number by entering vertically:");
if (n1 < n2)
if (n1 < n3)
{
Console.WriteLine("The Smallest Of Three numbers are:" + n1);
}
else
{
Console.WriteLine("The Smallest Of Three numbers are:" + n3);
}
else
if (n2 < n3)
{
Console.WriteLine("The Smallest Of Three numbers are:" + n2);
}
else
{
Console.WriteLine("The Smallest Of Three numbers are:" + n3);
}
}
}
}
```