Bob103

new

Apr 12th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. ifstream in("Input.txt");
  9. ifstream in2("Input2.txt");
  10. ofstream out("Output.txt");
  11.  
  12. float s;string s1,s2;
  13.  
  14. while (in.peek()!=EOF)
  15. {
  16. getline(in,s1);
  17. getline(in2,s2);
  18. for (int i=0;i<s1.size();i++)
  19. {
  20. for (int j=0;j<s2.size();j++)
  21.  
  22. {
  23. s=s1[i]+s2[j];
  24. ++i;++j;
  25. }
  26. }
  27. out<<s/2<<endl;
Advertisement
Add Comment
Please, Sign In to add comment