I just started university and managed to spend my entire first week sick, so I'm having a hard time figuring this out. I'm supposed to crack the caesar cypher. I have to declare a function crack : int * int -> int so that if (k, c) are of the type int, where k is the decrypted text and c the encrypted text, calling crack(k, c) will return the key (mod 10) n, which is needed to get c to k. An example would be that calling crack(20458790, 64892134) would return 4.
If c isn't a correctly encoding of k, the function doesn't have to actually work.
I hope I'm being clear enough here. I understand the actual assignment here (I have k and c, I need n), but I don't know how to show it in my code.
Thanks!