#include <stdio.h>
typedef struct {
double x;
double y;
} Pair;
Pair rain(int A[2][3]) {
double x=((A[1][1]*A[0][2])-(A[0][1]*A[1][2]))/((A[1][1]*A[0][0])-(A[0][1]*A[1][0]));
double y = (A[0][2] - A[0][0]*x) / A[0][1];
Pair p = {x, y};
return p;
}
int main() {
int v[2][3] = {{1,1,3},{1,-1,1}};
printf("%f,%f!\n",rain(v).x,rain(v).y);
int w[2][3] = {{9,5,9},{5,9,5}};
printf("%f,%f!\n",rain(w).x,rain(w).y);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: