Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
a1
//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 a1(int[] first) { if(first == null || first.Length%2==0) return 0; int chk = first.Length/2; int middle = first[chk]; for(int r=0; r<=first.Length; r++) { if(middle >= first[r] && chk != r) { return 0; } else if(r == first.Length) { return 1; } } } int[] test ={4, 7, 6}; Console.WriteLine(a1(test)); } } }
run
|
edit
|
history
|
help
0
Strings in C# with some properties examples
dfgthyjui8u7yt5rewsx
Test equality...2
Fórum ➡ GroupJoin'ing Books and Orders ♦
Byte array to base 64 string
makingNum
Lambdas
eryjuyhtgrfesdsadcfg
Events
C# - Integer to Roman