#include<stdio.h>
#include<stdlib.h>
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;
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}