Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. includes = %w(stdio.h stdlib.h)
  2. num_files = 1
  3.  
  4. (1..num_files).each_with_index { |_, i|
  5. File.open("Q#{i + 1}.cpp", 'w+') { |f|
  6. includes.each { |val|
  7. f.write("#include <#{val}>\n")
  8. }
  9.  
  10. f.write("\nint main() {\n}")
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement