Module MainModule

	Sub Main

	Console.WriteLine("Sorting values in decending order")
	Console.WriteLine()
	
	Dim ans As String

	Do
	
	Dim Num() As Integer
	Dim x As Integer
	Dim y As Integer
	Dim size As Integer
	Dim temp As Integer
	
	
	Console.WriteLine("Input Size of Array: ")
	size=Convert.ToInt32(Console.Readline())
	
	ReDim Num (size)
	
	For x=0 To size-1
	
	Console.WriteLine("Input number: ")
	Num(x)=Convert.ToInt32(Console.Readline())
	
	Next
	
	For x=0 To size-1

	For y=0 To size-1
	
			IF Num(y) < Num(y+1) 	Then
			
			temp=Num(y)
			Num(y)=Num(y+1)
			Num(y+1)=temp

			End IF
	
	Next
	
	Next
	
	Console.WriteLine()
	Console.WriteLine()
	Console.Write("The sorted value of the array are ")

	
	For x=0 To size-1
	
	Console.Write("  {0}  ", Num(x))

	Next

	Console.WriteLine()
	Console.WriteLine()
	Console.WriteLine("Try again Y/N: ")
	ans=Console.Readline()
	Loop While(ans.ToUpper="Y")
	
	End Sub 

End Module

