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

개인키,공개키/최원서,곽세환

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

개인키:100, 공개키:156

공개키

#include <fstream> 
#include <iostream>
#include <stdlib.h>
using namespace std; 

int main() 
{ 
	ifstream fin("input.txt");
    ofstream fout("output.txt");
	int f = 156;
	char a[20];
	for (int i = 0; ; i++)
	{
		fin.getline(a,20);
		if (!strcmp(a, "") && fin.eof())
			break;
		int c = strlen(a);
		for (int d=0;d<c;d++)
		{
			cout << (char)(a[d]+f);
			fout << (char)(a[d]+f);
		}
		cout << endl;
		fout << endl;
	}
    return 0;
}

개인키

#include <fstream> 
#include <iostream>
#include <stdlib.h>
using namespace std; 

int main()
{ 
	ifstream fin("output.txt");
    ofstream fout("output2.txt");
	int f = 100;
	char a[20];
	for (int i = 0; ; i++)
	{
		fin.getline(a,20);
		if (!strcmp(a, "") && fin.eof())
			break;
		int c = strlen(a);
		for (int d=0;d<c;d++)
		{
			cout << (char)(a[d]+f);
			fout << (char)(a[d]+f);
		}
		cout << endl;
		fout << endl;
	}
    return 0;
}