Topic: I Learnt C Language!
well partially lol
i wrote a program on gcc (which is a compiler and editor program)
and what it does is it works our simutaneous equations ![]()
this is it:
#include <stdio.h>
void main()
{
float A,B,C,D,p,q;
printf("input A: ");
scanf("%f", &A);
printf("input B: ");
scanf("%f", &B);
printf("input C: ");
scanf("%f", &C);
printf("input D: ");
scanf("%f", &D);
printf("input p: ");
scanf("%f", &p);
printf("input q: ");
scanf("%f", &q);
float det,x,y;
det=(A*D)-(B*C);
if (det>5e-40) {
x= ((p*D)-(q*B))/det;
y= ((q*A)-(p*C))/det;
printf("x= %f \n",x);
printf("y= %f \n",y);
} else {
printf("the two algebraic equations have degenerated to one single equation.");
}
}
save it, run it and u can work out any simulataneous equation
(well most lol)