#include #include // Write the numbers from 1 to 20 to a textfile int main() { FILE *out; // file pointer int i; out = fopen("out.txt", "w"); // open the file for writing for(i=1; i<= 20; i++) fprintf(out, "%d\n", i); // write the numbers to the file fclose(out); // close the file system("pause"); }