C,
pasted
on Dec 5:
|
#include <stdio.h>
int main() {
int i, j, x, y, keisu[2][3];
printf("ax + by + c\n");
printf("dx + ey + f\n");
printf("(a, b, c, d, e, f) > ");
for (i = 0; i < 2; ++i) {
for (j = 0; j < 3; ++j) {
scanf("%d", &keisu[i][j]);
}
}
x = keisu[0][2] * keisu[1][1] - keisu[0][1] * keisu[1][2];
y = -keisu[0][2] * keisu[1][0] + keisu[1][2] * keisu[0][0];
printf("(x, y) = (%d, %d)\n", x, y);
return 0;
}
|
Output:
|
ax + by + c
dx + ey + f
(a, b, c, d, e, f) > (x, y) = (2101103320, 1895766960)
|
|