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;
using System.Threading.Tasks;

namespace ConsoleApp10
&lbrace
className Smallest
&lbrace
public static void Main()
&lbrace
int n1, n2, n3;
Console.WriteLine("Enter Three number by entering vertically:");
n1 = Convert.ToInt32(Console.ReadLine());
n2 = Convert.ToInt32(Console.ReadLine());
n3 = Convert.ToInt32(Console.ReadLine());
if (n1 < n2)
if (n1 < n3)
&lbrace
Console.WriteLine("The Smallest Of Three numbers are:" + n1);
&rbrace
else
&lbrace
Console.WriteLine("The Smallest Of Three numbers are:" + n3);
&rbrace
else
if (n2 < n3)
&lbrace
Console.WriteLine("The Smallest Of Three numbers are:" + n2);
&rbrace
else
&lbrace
Console.WriteLine("The Smallest Of Three numbers are:" + n3);
&rbrace
&rbrace
&rbrace
&rbrace
`}

C# Program Output

Write a program that find the smallest number