okay, ive fixed it. My new version only accepts decimals, and it is also accompanied by a decryption program. however, my algorithm in the decrytion program is fouled up. Any suggestions, or help?
Code:
-----encrypt.c-----
#include <stdio.h>
main() {
int unenc, enc, pass;
printf("Please enter a decimal string that you would like encrypted --> \n");
scanf("%d", &unenc);
printf("Now, please enter a password, decimal only please! -->\n");
scanf("%d", &pass);
enc = pass*2/(unenc+53+3)/(unenc+pass)+(unenc*72)/pass+34;
printf("Your decimal string, encrypted is %d\n", enc);
}
-----end of encrypt.c-----
---start of decrypt.c-----
#include <stdio.h>
main() {
int unenc, enc, pass;
printf("Enter your encrypted decimal string for it to be decrypted-->\n");
scanf("%d", &enc);
printf("Please enter your password -->\n");
scanf("%d", &pass);
unenc = pass/2*(enc-53-3)*(enc-pass)-(enc/72)*pass-34;
printf("Your decimal string, unencrypted is %d\n", unenc);
}
-----end of decrypt.c-----
Code tags added by Hammer.