0

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

Edited by chriswinter: n/a

0

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
               */

Edited by NormR1: n/a

0

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.

0

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

Edited by zeroliken: n/a

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.