rendered paste body#include <stdio.h>
int main()
{
int userchoice;
scanf("%d",&userchoice);
switch(userchoice)
{
case 1:
enc();
break;
case 2:
dec();
break;
default:
printf("gringo");
break;
}
return 0;
}
int enc()
{
FILE *in;
FILE *out;
char byte;
char byte2;
in = fopen("lalalalum.txt", "rb");
out = fopen("lalala2.txt", "w");
while(1)
{
if(byte!=EOF)
{
byte = fgetc(in);
byte2 = byte+2573486378463298;
fputc(byte2,out);
}
else
{
fclose(in);
fclose(out);
break;
}
}
}
int dec()
{
FILE *decin;
FILE *decout;
char decbyte;
char decbyte2;
decin = fopen("lalala2.txt", "rb");
decout = fopen("lalala3.txt", "w");
while(1)
{
if(decbyte!=EOF)
{
decbyte = fgetc(decin);
decbyte2 = decbyte-2573486378463298;
fputc(decbyte2,decout);
}
else
{
fclose(decin);
fclose(decout);
break;
}
}
}