I'm writing a simple program that does int division and shows the remainder. I am trying to have the program run continuously until the user inputs 0 0. The program does stop after the user puts 0 0 but not before it says "Floating point exception" every single time. This is the code:
#include <stdio.h>
int main(){
int x;
int y;
while (1){
if (x && y == 0)
break;
else
scanf ("%i %i", &x , &y);
printf("%i %i / %i\n" , x / y , x % y, y);
}
return 0;
}