~cpp #include <iostream> #include <fstream> using namespace std; int main() { ifstream input("input.txt"); ofstream output("output.txt"); int i=0; char a; int sum[5]={0,}; while (input.eof() == false) { input >> a; sum[i%5]+=(int)a; i++; } for (i=0;i<5;i++) cout<<sum[i]<< " "; return 0; }