Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Before Number big
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int[] a= {100, 600,70,55,80,85}; int l = a.Length; int[] b = new int[l]; int count; bool big; for(int i=0; i<l; i++){ count = 0; big = false; for(int j=i-1; j>0; j-- ){ if(a[i]<a[j]){ count++; big = true; b[i] = count; break; } else count++; } if(!big) b[i] = 1; } for(int i=0; i<l;i++) Console.WriteLine(b[i]); } } }
run
|
edit
|
history
|
help
-1
Testing 10
Fórum ➡ Finding STRONG tags that contain UL tags, using Regex class♦
Validate or get the check digit of a Windows activation installation ID / confirmation ID
Xamarin
EFDCSX ASXS
Min Max Sum Avg
List
SquareMatrixPlusFieldMatrix
Only certain spheres.
Computing Time Zone Different