i need it to take the letter/message (from the fist column) and change the letter(s) in the second column

I think there is an equation that will do that.

any idea what that equation is?????

I've given you plenty of hints here. Now its your job to take the data that you've been working with and find the equation.

Do you know algebra? Do the other students in your class know algebra? How does your professor expect you to solve this problem?

Here's another clue:

``````for(char ltr = 'a'; ltr<= 'z'; ltr++) {
System.out.println(ltr + "->" + (char)<THE EQUATION HERE>);
}       /*  The above prints this:
a->z
b->y
c->x
d->w
e->v
f->u
g->t
h->s
...
v->e
w->d
x->c
y->b
z->a
*/``````

why is the equation in the print line?

to show the user the conversion...
Is there a reason for it not to be in the print line?

just wondering, do i still need the formula outside the print line as well. Considering its supposed to be a "encryption" i dont think it makes sense to print the converstion.

just wondering, do i still need the formula outside the print line as well. Considering its supposed to be a "encryption" i dont think it makes sense to print the converstion.

If you mean that you want to use the letters or string again then just store the converted letters in an array while in the for loop so you can use it again

If not then I don't know want you want here

The println wast to show how simple the equation is and to verify that the equation was correct.
Your program would use the equation for encrypting letters just like the equation in this statement:

``c = c + (key % 26);``

is used in the posted code above

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.