Step 1. Open Visual Studio 2015.
Step 2. Click New Project and open Console Application. Give any name in the name box.
Step 3. Declare number of arrays and arrange in an ascending order by using the code.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Ascending_Order
- {
- class Program {
- static void Main(string[] args) {
- Console.Write("Ascending Order is : ");
- int[] a = {
- 90,
- 80,
- 85,
- 95,
- 35,
- 30,
- 55,
- 70
- };
- Array.Sort(a);
- foreach(int value in a) {
- Console.Write(value);
- Console.Write(' ');
- }
- Console.ReadLine();
- }
- }
- }
Step 4. Your final output is given below-