When implementing this code
and the program runs when the black screen pops up it stays up nothing else waited a while and nothing happened didn't finish didn't give me process returned 0 to know it's done the output file is empty if someone can tell me what is wrong here
#include<iostream>
#include<fstream>
#include<iomanip>
using namespace std;
int main()
{
ifstream file;
ofstream out;
file.open("coinsCoint.txt");
out.open("1234567.txt");
int pennis,nickle,dime,quarter,sum=0;
float total;
while(!file.eof())
{
file >> pennis >> nickle >> dime >> quarter;
sum+=pennis+nickle*5+dime*10+quarter*25;
total=sum/100.0;
}
out << "Total amount collected is: $" << fixed << showpoint <<
setprecision(2) << total;
file.close();
out.close();
return 0;
}