fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. return 0;
  6. }
  7.  
Success #stdin #stdout 0s 9288KB
stdin
#include <stdio.h>    

int main()
{
	float a1,b1,c1,a2,b2,c2,d,dy,dx;
	int i,n;
	printf ("Nhap n = ");
	scanf ("%d",n);
	for (i = 1; i <= n; i++)
	{
		printf ("Nhap cac he so : ");
		scanf ("%f%f%f%f%f%f",&a1,&b1,&c1,&a2,&b2,&c2);
		d = a1*b2 - a2*b1;
		dx = c1*b2 - b1*c2;
		dy = a1*c2 - a2*c1;
		
		if (d != 0) 
			printf ("%.2f %.2f", dx/d, dy/d);
		else if (dx != 0)
			printf ("no solution");
		else
			printf ("many solution");
	}
	return 0;
}
stdout
Standard output is empty