anyone??
Type: Posts; User: kakaroto
anyone??
any tips on that?
in what loops i need to remove from the sides
and in what
between words
??
char* AtBash(char* text)
{
int i=0,start,j=0,k;
char* word,*str,c;
str=text;
while (i<strlen(text))
{
for(i=0;str[i]!=' ';i++);
if...
but i dont have those cases
i have only two
one if for a to z
one if for A to Z
am i correct?
so there is a conflicting logic in your solution
by your formula
result=-(original-'n')+'m'
we need to know the opposite char first in order to get to the result
so its not working
becase 'm' is the result in the first place
you told me one case which worked
but i couldnt figure out the general case
so i thought of this
if its 'a' - 'z' range
result ='a'+26-ch;
if its 'A' - 'Z' range
result ='A'+26-ch;
is it ok now?
this formula works fine
result=-(original-'n')+'m'
i think its simpler:
result =26-ch;
correct?
what amount ti subtract?
can you show the numbers i subtract and add to ch in order to convert
'a' to 'm' and vice versa
can you tell me how to change my c>'z' part
so it will do mirroring?
can you guide me specificly what lines should i change
i know thats its wrong
can you say why the c>'z' part is wrong?
is there such a process in my code
??
so without the helping function
do you see where is my mistakes
can you see how to solve it with out the helping functions
like i did it
?
how to do
to do a<->z, b<->y, c<->x, etc. .
i dont know how to do mirroring
i know that if ch is 'a'
and i want ch to be 'd'
then ch=ch+3
i was told to solve it in this manner
can you say where is the problem there
??
i am required to do it in one function
where is the logical mistake?
now i think its perfectly indented
char* AtBash(char* text)
{
int i=0,start,j=0,k;
char* word,*str,c;
str=text;
while (i<strlen(text))
i need to write a function which inputs a string
and removes all the spaces from the start and removes all the spaces from the end of the string.
the string consists of words separated by spaces....
i know that 'c'-'a'=2
using that property
how do i change 'a' into 'c'
??
i think its