what's wrong with my code that i can't get the values for x and y, assume that the denominator is not zero. i can't get constant values of x and y, most of the time its equal to zero. a1x + b1y = c1 a2x + b2y = c2
#include <stdio.h>
#include <math.h>
int main()
{
/* Write your program code here */
int a1,b1,c1,a2,b2,c2,x,y;
printf("Enter the value for a1: \n");
scanf("%d", &a1);
printf("Enter the value for b1: \n");
scanf("%d", &b1);
printf("Enter the value for c1: \n");
scanf("%d", &c1);
printf("Enter the value for a2: \n");
scanf("%d", &a2);
printf("Enter the value for b2: \n");
scanf("%d", &b2);
printf("Enter the value for c2: \n");
scanf("%d", &c2);
x=((b2*c1)-(b1*c2))/((a1*b2)-(a2*b1));
printf("x is %d\n", x);
y=((a1*c2)-(a2*c1))/((a1*b2)-(a2*b1));
printf("y is %d\n", y);
return 0;
}