Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

HASH구하기/조동영,이재환,노수민

From ZeroWiki
Revision as of 05:23, 7 February 2021 by imported>Unknown
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

이재환바보

#include <iostream>
#include <fstream>
using namespace std;

int main()
{
	ifstream fin ("input.txt");
	ofstream fout ("output.txt");
	char ch;
	int na[5]={0};
	int count=0;

	while(fin.get(ch))
	{
		na[count%5] += ch;
		count++;
	}
	cout << na[0] << " " << na[1] << " " << na[2] << " " << na[3] << " " << na[4] << endl;
	fout << na[0] << " " << na[1] << " " << na[2] << " " << na[3] << " " << na[4] << endl;
	return 0;
}