Welcome, guest! Login / Register - Why register?
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 ds ( 14 years ago )
#include "stdafx.h"
#include "stdio.h"
#include "textcode.h"


void invertchars(char *text)
{
int i=0;
char inverzia;


 while (text[i]!='\0')
 {

  if(text[i]>=33 && text[i]<=126)
  {  
 if (((float)(text[i]/2))==text[i]/2.0)
  inverzia = text[i] - 1;
 else
  inverzia = text[i] + 1;
  text[i]=inverzia;
  }
  
  i++;

 }

}

void revertchars(char *text)     
{

 


} 


void fileread(char *filname, char *text)
{
 int i=0;
 FILE *suborO ;

 suborO=fopen&#40;filname,"r"&#41;;

 do 
 {
 text[i++]=fgetc(suborO);
 }
 while(text[i-1]!=EOF);
 
 text[i-1]='\0';
 fclose(suborO);


// revertchars(text);
 invertchars(text);
}

void filewrite(char *filename, char *text)
{

 int i=0;
 FILE *suborW;

 suborW=fopen&#40;filename,"w"&#41;;
do
 {
  fputc((int)text[i++],suborW);
  
 }
 while(text[i]!='\0');
 
 fclose(suborW);


 invertchars(text);
// revertchars(text);

}

 

Revise this Paste

Your Name: Code Language: