The easy way to fix the "extra newline" problem is to simply add the option to skip it to your scanf call:
scanf( "%c%*c", &myVar );
Quzah.
The easy way to fix the "extra newline" problem is to simply add the option to skip it to your scanf call:
scanf( "%c%*c", &myVar );
Quzah.
Hope is the first step on the road to disappointment.
Where do I put this line of code ? At the top or....what ?
Also do I have to define fgets(buffer, max_input_size, stdin) or no ?
You can handle this one of two ways:
1) assume your user will enter the correct info, and in which case, just replace this:
With this:Code:printf ("\nAre you finished using the Newton Raphson's Root finder ?"); scanf("%c", &f);
2) You can do it the "safer" way, which will read into a buffer then parse the buffer. In this case, use fscanf instead of your regular scanf call.Code:printf ("\nAre you finished using the Newton Raphson's Root finder ?"); scanf("%c%*c", &f);
Quzah.
Hope is the first step on the road to disappointment.
Thanks for all the help guys I think I got that double hop thing fixxed I put a do while loop in there works like a champ. Okay guys thanks again !!!