Respuesta :
#include <iostream> #include <fstream> using namespace std; int main( int argc, ... outputFile.open( "primeNumbers.txt" ); //
Maybe this will help :)
Maybe this will help :)
Answer:
numbersFile=open("numbers.txt","w")
for i in range(1,101):
numbersFile.write("%s\n" % i)
numbersFile.close()
Explanation:
The programming language used here is python,.
The first line opens a file numbers.txt in the write mode (w), which means you can add new lines of text to the file.
In the second line, the range function is used with a FOR loop to generate a range of numbers from 1 through 100.
In the third line, the program adds all the numbers generated by the range and FOR loop to the txt file, and finally the file is closed.