using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication17
{
class Program
{
static void Main(string[] args)
{
int i, j;
double t;
double[] arr = {1,1.2,0.98,1.38,0.99 };
Console.WriteLine("Arrays
Values ");
for (i = 0; i < arr.Length; i++)
{
Console.Write(" "+arr[i]);
}
for (i = 0; i < arr.Length; i++)
{
for
(j = i+1; j < arr.Length; j++)
{
if (arr[i] > arr[j])
{
t = arr[i];
arr[i] = arr[j];
arr[j] = t;
}
}
}
Console.WriteLine("\nSorted
Arrays Values ");
for (i = 0; i < arr.Length; i++)
{
Console.Write(" "+arr[i]);
}
Console.ReadKey();
}
}
}
|
|
|
Computer Science :: 11th/12th, Computer Engineering :: Degree/Diploma, Coding Concept ( C, C++ & JAVA Programming, JDBC Concept, DBMS - SQL Concept, Data Structure, Communication & Network Concept.
Tuesday, November 24, 2015
C# ASSECENDING ORDER SORTING ARRAYS VALUES
Subscribe to:
Post Comments (Atom)
15 August vs 26th January
ध्वजारोहण (Flag Hoisting) और झंडातोलन/ध्वजोत्तोलन (Flag Unfurling) दोनों में अर्थ, परंपरा और प्रक्रिया का अंतर होता है। ध्वजारोहण 15 अगस्त ...
-
COMPUTER TERMINOLOGY 1) TCP/IP - Transmission Control Protocol/ Internet Protocol. 2) HTTP...
-
https://makecode.com/_3VxaMo6c3YPp Code 1) What is Make Code Arcade? Answer: Make Code Arcade is a Block based coding. 2) Writ...
-
1) Choose correct one :- 1) The step by step plan of solution for solving a problem is called ____. a) Algorithm b) Internet c) URL d) M...
-
1) ___ is the response of the receiver after perceiving the message. a) Encoding b) Decoding c) Channel d) Feedback 2) Which of the fo...
-
Check whether the number is negative or positive after taking a number as input from the user. TextWindow . WriteLine ( "Ente...

No comments:
Post a Comment