jcb00

Q: Help with this code please

#include <stdio.h>

#include <string.h>

int main()

{

    char a[22]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r', 's','t','v','x'}, t[80];

    int i,i2;

    printf ("Introduce tu texto...");

    scanf ("%[^\n]", t);

    for (i=0;i<strlen(t);i=i+1)

    {

        for (i2=0;i2<22;i2=i2+1)       

     if (t[i]==a[i2])

   

                if (i2!=19 && i2!=20 && i2!=21)

                {

                   t[i]==a[i2+3];

                   break;

                }

     else

                {

                   t[i]=a[i2-19];

                   break;

     }

    }            

printf("Palabra encriptada: %s", t);

}

I dont know *** is wrong with the code I´ve run it like 20 times and it doesn´´t work

HELP

Posted on Feb 13, 2016 4:19 AM

Close

Q: Help with this code please

  • All replies
  • Helpful answers