Advertisement
Shiaobin

找出兩檔中相同數字

Dec 1st, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. = 流程 =
  2. 比較次數 input1 input2 行動
  3. 0 5 5 印出,兩邊都讀下一筆
  4. 1 10 6 右邊小,右邊讀下一筆
  5. 2 10 7 右邊小,右邊讀下一筆
  6. 3 10 8 右邊小,右邊讀下一筆
  7. 4 10 9 右邊小,右邊讀下一筆
  8. 5 10 10 印出,兩邊都讀下一筆
  9. 6 15 11 右邊小,右邊讀下一筆
  10. 7 15 12 右邊小,右邊讀下一筆
  11. 8 15 13 右邊小,右邊讀下一筆
  12. 9 15 14 右邊小,右邊讀下一筆
  13. 10 15 15 印出,兩邊都讀下一筆
  14. 11 已達檔尾,結束
  15.  
  16.  
  17. = 兩檔案內容 =
  18. input1.txt:
  19. 5
  20. 10
  21. 15
  22. 20
  23. 25
  24. 30
  25. 35
  26. 40
  27. 46
  28. 50
  29.  
  30. input2.txt:
  31. 5
  32. 6
  33. 7
  34. 8
  35. 9
  36. 10
  37. 11
  38. 12
  39. 13
  40. 15
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement