Steph,
I think the problem is putting the \n within the specifier for your scanf function like scanf("%d\n",....)
This works much better if you place it in the printf statement, as that does not take an input, and I think this is what causes your problem with scanf. The printf statements then become printf("\n........")