// Open the file in text writing mode int fileID = open("world.txt", "w"); // Write three lines to the file, one at a time writeln(fileID, "Hello"); writeln(fileID, "World"); writeln(fileID, "!"); // Close the file close(fileID);