Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Es_gb
- {
- class Program
- {
- //riempimento manuale di due vettori
- private static int[] vet1 = new int[] { 5, 2, 4, 6, 9, 9 };
- private static int[] vet2 = new int[] { 5, 3, 5, 0, 5, 9 };
- static void Main(string[] args)
- {
- int count = 1;
- int c2 = 1;
- for (int i = 0; i < vet1.Length; i++)
- {
- for (int j = 0; j < vet2.Length; j++)
- {
- if (vet1[i] != vet2[j])
- {
- count++;
- }
- if (vet2[i] != vet1[j])
- {
- c2++;
- }
- }
- if (count > vet1.Length)
- {
- Console.WriteLine(vet1[i]);
- }
- if (c2 > vet1.Length)
- Console.WriteLine(vet2[i]);
- count = 1;
- c2 = 1;
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement