#include #include #include using namespace std; int main(){ ios::sync_with_stdio(false); fstream f; f.open("examene.txt", ios_base::in); if(!f.is_open()){ cout<<"Error: file does not exist"; return 1; } int sum=0; for(int i=0; i<6; i++){ int buff; f>>buff; sum+=buff; } f.close(); f.open("media.txt", ios_base::out); double avg = (double)sum / 6; f<