Implementation of the Jacobi Symbol in C
I am only looking for some feedback on my coding style.


Formatting is good. I hope it is auto formatted.

Respect the presentation width

Rather than oblige a horizontal scroll bar, auto format to a narrower width to avoid that.

Avoid dogma

"to ONLY USE ONE return statement in functions and NOT to use things like break, continue or go-to." --> This is a reasonable goal, but better to code for clarity.  Use break, continue and even sometimes goto when it provides cleaner code.




  How could I improve?


Use short to save space in arrays - not here 

short jacobi(long a, long n) returns 0,1,-1.  There is no space, code, performance savings expected with short.  Recommend returning int here. int is often the optimal type for an integer.

// short result = 1;
int result = 1;
...
return result;


Cryptography begs for unsigned types

Instead of long, consider the widest unsigned type of uintmax_t or the widest fixed size type: uint64_t.

Unsigned types will improve code performance.

long n ... n_mod8 = n % 8; requires a division as n % 8 has 15 different results [-7 ... 7].  With unsigned long n, n % 8 is simply a mask operation.

Consider bool

For clarity, use bool.

//short condition = 1;
//while (condition == 1) {
bool condition = true;
while (condition) {


Remove debug code

e.g. // printf("(%d|%d) and result = %d \n", a, n, result);.

Error messages: consider stderr

// printf("Wrong input for the Jacobi Symbol:...
fprintf(stderr, "Wrong input for the Jacobi Symbol: ...


Post expected test code results

What should printf("%d", jacobi(4852777,12408107)); print? 

Consider a few more test cases.

Post compilable code

Trailing ``` breaks compilation.

Minor

// The The if-condition below utilises the fact that (0|n) = 0.
to
// The if-condition below utilises the fact that (0|n) = 0.





  Is anything unclearly formulated?


I'd add a reference for Jacobi symbol.

// https://en.wikipedia.org/wiki/Jacobi_symbol


n == 1?

Hmmm. Jacobi symbol allows n==1.  Code here does not.