Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
sorted array
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { /* * C# Program to Perform Bubble Sort */ using System; class bubblesort { static void Main(string[] args) { int[] a = { 30, 20, 50, 40, 10 }; int t; Console.WriteLine("The Array is : "); for (int i = 0; i < a.Length; i++) { Console.WriteLine(a[i]); } for (int j = 0; j <= a.Length - 2; j++) { for (int i = 0; i <= a.Length - 2; i++) { if (a[i] > a[i + 1]) { t = a[i + 1]; a[i + 1] = a[i]; a[i] = t; } } } Console.WriteLine("The Sorted Array :"); foreach (int aray in a) Console.Write(aray + " "); Console.ReadLine(); } } } } }
run
|
edit
|
history
|
help
0
amstrong number
database interior 0.2
Custom thousand separator
array integration
Fórum ➡ Get all combinations for ▶different◀ Id's ♦
Complex
Lexicon
Morse code
Problem: rstring
Homework3