Guest User

Untitled

a guest
Nov 9th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1.  
  2.  
  3. ##Justin Beitz
  4. ##Assignment 3
  5.  
  6. unless ARGV[0].to_s == "input.txt"
  7. puts "Wrong input"
  8. end
  9.  
  10. unless ARGV[1].to_s == "output.txt"
  11. puts "Wrong output"
  12. end
  13.  
  14.  
  15. input = ARGV[0].to_s
  16. output = ARGV[1].to_s
  17.  
  18.  
  19.  
  20. def fileIO
  21.  
  22. inFile = File.new("input.txt", "r")
  23. inFile.each_line do |line|
  24. clean = line.chomp
  25. createArray(clean)
  26.  
  27. end
  28. end
  29.  
  30. def createArray (clean)
  31.  
  32. line_array = clean.split("/\n/")
  33. puts line_array
  34. return line_array
  35. end
  36.  
  37. def calcAverage (new_line)
  38.  
  39. end
  40.  
  41. fileIO
Advertisement
Add Comment
Please, Sign In to add comment