U E D R , A S I H C RSS

HASH구하기/류주영,황재선

~cpp 
#include <iostream>
#include <fstream>
#include<string>
using namespace std; 
int main() 
{
	ifstream fin("input"); // fin과 input.txt를 연결  
	ofstream fout("output.txt"); // fout과 output.txt를 연결
	char pass[100];
	fin >> pass;
	
	
	
	
	int hash[5] = {0};
	
	for(int i=0;i<5;i++)
	{
		
		for(int j=i;j<strlen(pass);j+=5)
		{
			hash[i] += (int)(pass[j]);
		}
		
		
	}
	for(int k=0;k<5;k++)
	{
		cout << hash[k] << " ";
		fout << hash[k] << " ";
	}
	return 0;
}

암호화실습, 블스캠프2004/목요일
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:20
Processing time 0.0204 sec