S
spidey12345
so If i enter the letter blbabh
the word will acutally become: blah
// repeatble letters in the key
char checkkey[] = pkey.toCharArray();
int pkeysize = checkkey.length;
int counter = 0;
for(int i = 1; i< pkeysize; i++)
{
for(int j = 0; j< i; j++)
if(checkkey ==checkkey[j])
{
checkkey = '0';
}
}
// what i did here was just assign all repeated b's to 0 so i would
have
// bl0a0h
for(int i = 0; i<pkeysize; i++)
{
System.out.println(checkkey);
if(checkkey == '0')
counter++;
}
// it works up to this point, i get bl0a0h
// some thing is wrong with the aglorithm here....
System.out.println(counter);
int nsize = pkeysize-counter;
char nkey[] = new char[pkeysize];
for(int i = 0; i< pkeysize; i++)
{
int j = 0;
if(checkkey != '0')
{
nkey[j] = checkkey;
j++;
}
}
for(int i = 0; i< nsize; i++)
System.out.print(nkey);
// but when i try to print out the nkey, it gives me bunch of shit
the word will acutally become: blah
// repeatble letters in the key
char checkkey[] = pkey.toCharArray();
int pkeysize = checkkey.length;
int counter = 0;
for(int i = 1; i< pkeysize; i++)
{
for(int j = 0; j< i; j++)
if(checkkey ==checkkey[j])
{
checkkey = '0';
}
}
// what i did here was just assign all repeated b's to 0 so i would
have
// bl0a0h
for(int i = 0; i<pkeysize; i++)
{
System.out.println(checkkey);
if(checkkey == '0')
counter++;
}
// it works up to this point, i get bl0a0h
// some thing is wrong with the aglorithm here....
System.out.println(counter);
int nsize = pkeysize-counter;
char nkey[] = new char[pkeysize];
for(int i = 0; i< pkeysize; i++)
{
int j = 0;
if(checkkey != '0')
{
nkey[j] = checkkey;
j++;
}
}
for(int i = 0; i< nsize; i++)
System.out.print(nkey);
// but when i try to print out the nkey, it gives me bunch of shit