0

I need help

#include <stdio.h> long reverse(long); int main() { long n, r; scanf("%ld", &n); r = reverse(n); printf("%ld\n", r); return 0; } long reverse(long n) { static long r = 0; if (n == 0) return 0; r = r * 10; r = r + n % 10; reverse(n/10); return r; } It is a program for reversing a number I can't understand part after scanf("%ld"&n) Please explain me part after that briefly

13th Oct 2018, 5:06 AM
Samadhan Patil
Samadhan Patil - avatar
1 Resposta
0
I think it's wrong but I'm not sure
13th Oct 2018, 5:37 AM
Daniele Bonomi
Daniele Bonomi - avatar