عقدني مره أرجوا المساعده بسرعه
لدي ملفين
الاول به هذه الاسماء
Fred
Steve
mike
sam
Tom
والملف الاخر به
100 100 100 100 100
60 70 40 20 80
100 88 22 100 77
0 10 15 15 22
أريد المخرج هكذا
الاسم المعدل التقدير
....... ....... .......
....... ....... .......
....... ....... .......
....... ....... .......
....... ....... .......
أنظرو كيف بدأت
#include
#include
#include
main()
{
ifstream instream;
ofstream outstream;
int x,sum;
float avg;
cout<<"n please Enter the name of the file inputn";
cin>>filein;
cout<<"n please Enter the name of the file outputn";
cin>>fileout;
instream.open(filein);
if(instream.fail())
{
cout<<"n can not open the file"<exit(1);
}
outstream.open(fileout);
if(outstream.fail())
{
cout<<"n can not open the file"<exit(1);
}
لكن هنا لم أعرف كيف أجعله يخرج الاسم ويحسب المعدل والتقدير
instream.close();
outstream.close();
}
فهل من مساعد