Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by Milan ( 14 years ago )
#include "stdafx.h"
#include "stdio.h"
#include "textcode.h"
void invertchars(char *text)
{
int n=0;
char inverze;
while (text[n]!='\0')
{
if(text[n]>='0' && text[n]<='z')
{
inverze = text[n] - '0';
text[n]= 'z' - inverze;
}
n++;
}
}
void revertchars(char *text)
{
int n=0;
char inverze;
while (text[n]!='\0')
{
if(text[n]>='0' && text[n]<='z')
{
inverze = text[n] + '0';
text[n]= 'z' - inverze;
}
n++;
}
}
void fileread(char *filename, char *text)
{int n=0;
FILE *soubor;
soubor=fopen(filename, "r");
do
{
text[n++]=fgetc(soubor);
}
while(text[n-1]!=EOF);
text[--n]='\0';
fclose(soubor);
// revertchars(text);
// invertchars(text);
}
void filewrite(char *filename, char *text)
{
int n=0;
FILE *soubor;
soubor=fopen(filename,"w");
do
{
fputc((int) text[n++],soubor);
}
while(text[n]!='\0');
fclose(soubor);
// invertchars(text);
// revertchars(text);
}
Revise this Paste
Parent: 47958