how to make a decrypt code for this encrypt program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to make a decrypt code for this encrypt program

int encrypt (n) int a=n/1000; int b=(n/1000)/100; int c=(n%100)/10; int d=n%10; a=(a+7)/10; b=(b+7)/10; c=(c+7)/10; d=(d+7)/10; return ((c*1000)+(d*100)+(a*10)+b);

29th Oct 2016, 1:49 AM
KG Feignh
KG Feignh - avatar
2 Answers
+ 1
Wouldn't you just reverse the math, using correct order of operations?
29th Oct 2016, 3:09 AM
Zeke Williams
Zeke Williams - avatar
0
using manual computauin it will work but if i run that in my program it will not work .. the answer is always 0
29th Oct 2016, 3:57 AM
KG Feignh
KG Feignh - avatar