Guest User

Untitled

a guest
Apr 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. program capicua(inputoutput);
  2.  
  3. (* Plantee e implemente una función en PASCAL que indique si un array de enteros es capicúa.
  4. Autor: Fernando Posse
  5. FEcha: 5-12-11
  6. Version: 1.0
  7. *)
  8.  
  9.  
  10. TYPE
  11.  
  12. tarray= ARRAY[1..n] of integer;
  13. VAR
  14. tabla:tarray;
  15. n:integer;
  16.  
  17.  
  18.  
  19. (**************************************************************************************************)
  20. procedure meter(VAR tabla:tarray;VAR n:integer;);
  21. VAR
  22. i:integer value 1
  23. BEGIN
  24. write('Escriba el numero de componentes del array ');
  25. readln(n);
  26. write('Escriba el número ');
  27.  
  28. WHILE not eoln do
  29. BEGIN
  30. read(tabla[i]);
  31. i:=i+1;
  32. END;
  33. END;
  34. (****************************************************************************************************)
  35. (*function calculo(tabla:tarray):boolean;
  36. VAR
  37. i:integer;
  38. capi:boolean value true;
  39. BEGIN
  40. WHILE capi do
  41. BEGIN
  42. *)
  43.  
  44. BEGIN meter(tabla) end.
Add Comment
Please, Sign In to add comment