Share your repls and programming experiences

← Back to all posts
aa
AngelGabrielG24 (0)

#include <iostream>
using namespace std;

int x=3;
void TRIM(char* mat )
{
int i,j,aux;

for(i=0;i<x;i++)
{
for(j=0;j<i;j++)
{
aux= (mat+ix+j);
(mat+ix+j)=(mat+jx+i);
(mat+jx+i)=aux;
}
}
}

int main()
{
char A[] = {"como estas"};
cout<<"encriptada: "<<endl;

for(char p = A; p < A+9; p++)
{
cout<<
p <<" ";
}

cout<<endl;
//cout<<endl;
//cout<<"desincriptada: ";
cout<<endl;

TRIM(A);

for(char p = A; p < A+9; p++)
{
cout<<
p <<" ";
}
}