error

i made this program in microsoft visual basic. and theres an error
THe exception integer division by zero. (0xc0000094) occured in the application at location 0x004011115.
heres my program:

#include <conio.h>
#include <stdio.h>
#include <iostream.h>
#include <string.h>


int x=1, y=0, div;

main() {

div=x/y;

cout<<"The quotient is "<<div<<" .";

return 0;
}

i also tried to run this program in dev c++. the output was 1.#INF

i know that i cannot divide 1/0. it was undefined. but what must be the real output when i tried to divide 1/0?
Since you know that it is not possible to divide a number by zero.
The program does not also know the output, it throws exception error. I suggest you to read exception handling.
thanks!
you mean visual studio not visual basic isn't it?
Topic archived. No new replies allowed.