To read an int using scanf we use:
int
scanf(\"%d\", &i);
What if i is a long not int??
i
long
For gods sake:
long n; scanf( "%ld", & n );