More actions
imported>Unknown No edit summary |
(Repair batch-0004 pages from live compare) |
||
| Line 11: | Line 11: | ||
ofstream fout("output.txt"); | ofstream fout("output.txt"); | ||
int f = 156; | int f = 156; | ||
char a | char a[20]; | ||
for (int i = 0; ; i++) | for (int i = 0; ; i++) | ||
{ | { | ||
| Line 20: | Line 20: | ||
for (int d=0;d<c;d++) | for (int d=0;d<c;d++) | ||
{ | { | ||
cout << (char)(a | cout << (char)(a[d]+f); | ||
fout << (char)(a | fout << (char)(a[d]+f); | ||
} | } | ||
cout << endl; | cout << endl; | ||
| Line 39: | Line 39: | ||
ofstream fout("output2.txt"); | ofstream fout("output2.txt"); | ||
int f = 100; | int f = 100; | ||
char a | char a[20]; | ||
for (int i = 0; ; i++) | for (int i = 0; ; i++) | ||
{ | { | ||
| Line 48: | Line 48: | ||
for (int d=0;d<c;d++) | for (int d=0;d<c;d++) | ||
{ | { | ||
cout << (char)(a | cout << (char)(a[d]+f); | ||
fout << (char)(a | fout << (char)(a[d]+f); | ||
} | } | ||
cout << endl; | cout << endl; | ||
| Line 56: | Line 56: | ||
return 0; | return 0; | ||
} | } | ||
Latest revision as of 00:37, 27 March 2026
개인키: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;
}