U E D R , A S I H C RSS

개인키,공개키/임영동,김홍선

No older revisions available

No older revisions available



~cpp 
#include <iostream> 
#include <fstream> 
using namespace std; 
 
void main() 
{ 
  ifstream fin("xm.txt"); 
  ofstream fout("out.txt"); 
  char arr[100]; 
  int key=30, count=0, i=0,temp; 
 
 
  while(!fin.eof()) 
  { 
          fin.get(arr[i]); 
      i++; 
      count++; 
  } 
 
   for(i=0;i<count;i++) 
  { 
          int temp = int (arr[i]) + key; 
          arr[i]=char (temp); 
           fout << arr[i]; 
           cout << arr[i]; 
             } 
  cout << endl; 
  for(i=0;i<count;i++) 
  { 
	  temp = (int (arr[i]) - key +256)%256;
          
          arr[i]=char (temp); 
          fout << arr[i]; 
          cout << arr[i]; 
  } 
  
  
  
  cout << endl; 
} 

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:40
Processing time 0.0265 sec