#include #include int main(int argc,char* argv[]) { int x = atof(argv[1]); FILE *fp1 = fopen(argv[2], "r"); FILE *fp2 = fopen(argv[3], "w"); int i = 0; char tab; char tekst[1000]; while (fscanf(fp1, "%c", &tab) == 1) { tekst[i] = tab; //i++; if(tekst[i]>=65 && tekst[i]<=90-x) tekst[i]=int(tekst[i])+x; //wielkie liter else if(tekst[i]>=91-x && tekst[i]<=90) tekst[i]=int(tekst[i])-26+x; // wielkie litery else if(tekst[i]>=97 && tekst[i]<=122-x) tekst[i]=int(tekst[i])+x; //ma³e liter else if(tekst[i]>=123-x && tekst[i]<=122) tekst[i]=int(tekst[i])-26+x; fprintf (fp2, "%c", tekst[i]); printf("%c", tekst[i]); i++; } fclose(fp1); fclose(fp2); return 0; }