Ask your own question, for FREE!
OpenStudy Feedback 8 Online
OpenStudy (anonymous):

Is this algorithm well written?(in c++) #include #include int n,v[2],i,s=0; char name1[2],name2[2]; void main() {cout<<"name1="; cin>>name1; cout<<"name2="; cin>>name2; ifstream f("name1.txt"); ofstream g("name2.txt"); f>>n; for(i=1;i<=n;i++) {f>>v[1];} for(i=1;i<=n;i++) {if(v[i]%2==0) s=s+v[i];} g<

OpenStudy (anonymous):

compilation error

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!