No older revisions available
No older revisions available
Describe HASH구하기/박진영,김수진 here.
~cpp #include <iostream> #include <fstream> using namespace std; int main() { ifstream fin("source.txt"); char ch; int i=0; int sum[5]= {0}; while (fin>>ch) { sum[i++] += int(ch); if (i>4) i = 0; } for(i=0; i<5; i++) cout<<sum[i]<<"\n" return 0; }