#include <stdio.h>

int main() {
    float a, b, c, d, e, f, det_principal, det_x, det_y;

    printf("Ecuacion 1: ax + by = c\nEcuación 2: dx + ey =f\n");

    printf("Introduce el coeficiente a, b, c, d, e, f: \n");
    scanf("%f %f %f", &a, &b, &c);
    scanf("%f %f %f", &d, &e, &f);

    det_principal = a * e - b * d
    det_x = c * e - b * f;
    det_y = a * f - c * d;

    if (det_principal != 0) {
        x = det_x / det_principal;
        y = det_y / det_principal;

        printf("Sistema COMPATIBLE DETERMINADO:\n");
        printf("x = %.2f\ny = %.2f\n", x, y);
    } 
    else {
        if (det_x == 0 && det_y == 0) {
            printf("Sistema COMPATIBLE INDETERMINADO.\n");
        } 
        else {
            printf("Sistema INCOMPATIBLE.\n");
        }
    }

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: