A simple Caesar encryption program

zhaozj2021-02-16  55

#include Void main (void) {char strch, ch; int i, x; ifstream readfile; instream writefile; readfile.open ("1.txt", ios :: in | iOS :: Nocreate); if (! readfile) {CERR << "Cannot Open Thie file for infut" << endl; exit (0);} Writefile.Open ("2.txt", ios :: in | ios :: nocreate ; If (! Writefile) {CERR << "Cannot Open THE FIL OUTPUT" << Endl; Exit (0);} while (! Readfile.eof ()) {ch = readfile.get (); x = static_cast < INT> (CH); x = (x 3)% 128; strCh = static_cast (x); writefile.put (strch);}}

转载请注明原文地址:https://www.9cbs.com/read-26973.html

New Post(0)