I use the compiler jgrasp, and scanf presents problems for me too.
for example, my code will be
Instead of printing "Enter the value for N: " and scanning, it scans and THEN prints "Enter the value for N: ". I've gotten around this problem by just putting a line break \n after my printfs, but sometimes I wish I could scan for text on the same line! Has anyone ever encountered this problem, because my prof in class will enter the exact same lines of text, compile, and have it come out working perfectly!
printf ("Enter the value for N: ");
scan f ("%lf", &N);