~cpp #include <iostream> #include <fstream> using namespace std; void enpass() { int key,index=-1; // cin >> " char buffer[300]={0}; char fileName[10]; cout << "파일이름 : "; cin >> fileName; ifstream fin(fileName); cout << "키값 : "; cin >> key; while(fin.get(buffer[++index])) { cout << char( int(buffer[index]) + key) << " "; } cout << endl; } void depass() { int key,index=-1; // cin >> " char buffer[300]={0}; char fileName[10]; cout << "파일이름 : "; cin >> fileName; ifstream fin(fileName); cout << "키값 : "; cin >> key; while(fin.get(buffer[++index])) { cout << char( int(buffer[index]) -n key) << " "; } cout << endl; } int main() { enpass(); depass(); return 0; }