Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- includes = %w(stdio.h stdlib.h)
- num_files = 1
- (1..num_files).each_with_index { |_, i|
- File.open("Q#{i + 1}.cpp", 'w+') { |f|
- includes.each { |val|
- f.write("#include <#{val}>\n")
- }
- f.write("\nint main() {\n}")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement