Create a file from input

Write an app that will create a file with a given name and content.

  • When the app is launched, ask the user to enter the file name.
  • When the name is provided, ask to enter next line of the content in a while loop until user enters stop.
  • When the user completes interaction, create a file with name and fill it with content provided by user. File extension should be txt.

Example:

Enter name of the file: name1
Enter new line of content: This is the first line of content
Enter new line of content: This is the second
Enter new line of content: stop
# File name: "name1.txt"
# File content:
# This is the first line of content
# This is the second