#include "stdafx.h" #include <fstream> #include <iostream> using namespace std; int main() { int z[100000]; for(int i=1; i<10; i=i+2){ z[i]=i; cout<<i; cout<<"\n"; ofstream out_file("C:\\1.txt"); if(!out_file) cout << "error"; else out_file << i; } system("PAUSE"); return 0; }