Guest User

Untitled

a guest
Jun 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. int[] a = new int[2];
  2. int[] b = new int[2];
  3. int[] c = new int[2];
  4. int n = 0, m = 0, i, k, l=0;
  5.  
  6. for (i = 0; i < a.Length; i++)
  7. {
  8. Console.WriteLine("Ingrese numero vector A");
  9. a[i] = Convert.ToInt32(Console.ReadLine());
  10.  
  11.  
  12. }
  13.  
  14. for (k= 0; k < b.Length; k++)
  15. {
  16. Console.WriteLine("Ingrese numero vector B");
  17. b[k] = Convert.ToInt32(Console.ReadLine());
  18. //Comparo el valor de b que estoy guardando con la posicion de a. si es correcto se guarda en el vector c
  19. if (b[k] == a[i])
  20. {
  21.  
  22. b[k] = c[l];
  23.  
  24. Console.WriteLine("C: " + c[l]);
  25. }
  26.  
  27. }
Add Comment
Please, Sign In to add comment