hello to all,
I am new to c programming and i have encountered some very frustrating problem.
so i was suppose to write a program that gives a divide error but output is not showing anything like it.
I am using orwell devc++ 5.4.2 and all the default built tools(gcc compiler etc.) with default settings.
so, what should i do to see this error?
thanks for reading it!Code:#include<stdio.h> #include<conio.h> int main() { int a,b,c; float x; a=250; b=85; c=25; x=a/(b-c); printf("x = %f\n",x); a=300; b=70; c=70; x=a/(b-c); printf("x = %f\n",x); getch(); return 0; }
any suggestions are welcome!
Update-
output by orwell devc++
output by borlands turbo c++ ver3
As you can see borland's tc++ compiler does generate this error. But i still don't know why gcc doesn't do this.