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 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;
}