Write a c++ program that adds 8 integers and send the result into a data file..
ID: 3634030 • Letter: W
Question
Write a c++ program that adds 8 integers and send the result into a data file..THis is what i did.. it has 12 errors idk how to fix them... please help!!
#include<iostream>
#include<fstream>
int main()
{
int total;
int a, b, c, d, e, f, g, h, i, j;
cout<< "Enter 10 integers: " << endl;
cin>> a >> b >> c >> d >> e >> f >> g >> h >> i >> j;
total= a+b+c+d+e+f+g+h+i+j;
ofstream fout;
stream object
fout.open("myoutput.txt");
fout<< total << endl;
fout.close();
}