#include <iostream>
#include <fstream>
using namespace std;
int main()
 {
    ofstream output_file ("sales.txt",ios::out); ;
   int i, day, sales;
   if (!output_file) {
      cout<<"  can't open file!";
   }
   cout<<"  enter number of days : ";
   cin>>day;
   for (i=0; i<day; i++) {
       cout<<"  enter daily sales (day) : "<< i+1<<" = ";
       cin>>sales ;
       output_file<<sales<<endl;
   }
   output_file.close();
   return 0;
}
