U E D R , A S I H C RSS

개인키,공개키/강희경,조동영

No older revisions available

No older revisions available



개인키 공개키(개인키 : 47,공개키 : 209)

~cpp 
#include <fstream> 
#include <iostream>
using namespace std; 
 
int main() 
{ 
        ifstream fin("input.txt");   
        ofstream fout("output1.txt");
		
		char num;
		
		while(fin.get(num))
		{
		num += 47 ;		
		fout << num;
		}

		int open_key;
		cout << "공개키를 입력하시오 : ";
		cin >> open_key;

		fout.close();
		fin.close();

		ifstream fin1("output1.txt");
        ofstream fout1("output2.txt");
		

		while (fin1.get(num))
		{
			num += open_key;
			fout1 << num;
		}
		fin1.close();
		fout1.close();
		
		return 0;
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:41
Processing time 0.0298 sec