Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Search Element In Array-Recursive
//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) { int []arr={1,2,3,4,5,6,7}; Console.WriteLine(Search(arr,0,7)); } public static int Search(int []arr, int index, int element) { if(index==arr.Length) { return -1; } else { if(arr[index]==element) { return 1; } else return Search(arr, index+1, element); } } } }
run
|
edit
|
history
|
help
0
30272 ProgramEX8 For&While
Modulul 3, Exerciţiul 2 – Crearea şi utilizarea unui tip struct
Code challenge: Integer Comparison - Overkill - Function Dictionary
10857
sdfgtgrfedcdf
Putting In-Between Symbols
Expand Treeview Job Entry
3D Array
1
bytes to string to bytes.