daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. while input >= 0 and index < 10 do
  2.     begin
  3.     read(input);
  4.     array1[index] := input;
  5.         index++
  6.     end;
  7.  
  8. input:= 0; //to reset it
  9.  
  10. another while loop but for list2...
  11.    
  12. list 1: 1 list 2: -1
  13. list 1: 2 list 2: 2
  14. list 1: 3 list 2: 3
  15. list 1: -1 list 2: 4
  16.    
  17. index:= 0;
  18. readln (input);
  19. while (input >= 0) and (index < 10) do
  20.  begin
  21.   inc (index);
  22.   array2[index]:= input;
  23.   readln (input)
  24.  end;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top