Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
a5
//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[] firstt ={1, 5, 6}; int[] secondd ={1, 6, 3}; int[] a5(int[] first , int[] second) { int[] sav =new int[2]; int y=0 ; bool w= true; if(first == null ||second == null ||first.Length<0 || second.Length<0) { return null; } else { for(int i=0;i<first.Length;i++) { w=true; for(int o=0;o<second.Length;o++) { if(first[i]==second[o]) { for(int r=0; r <sav.Length; r++) { if(sav[r]==second[o]) { w=false; } } if(w==true) { sav[y]=second[o]; y++; } } } } } return sav; } int[] tess=a5(firstt, secondd); Console.WriteLine(tess[2]); } } }
run
|
edit
|
history
|
help
0
remove special char
NumsToVars
shorten file paths in a commandline using regex
Symantic check for object type variables
NumberSeenSample
5555555
Math 9.5
DateTime Subtract TotalDays
String to keycode and switch check
Rotate array to the right of a given pivot