-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11068.cpp
More file actions
36 lines (26 loc) · 733 Bytes
/
Copy path11068.cpp
File metadata and controls
36 lines (26 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<stdio.h>
/* An Easy Task - 11068 */
typedef struct line Line;
struct line{
int a;
int b;
int c;
};
main(){
Line r1,r2;
int Da,Dx,Dy;
while(1){
scanf("%d %d %d",&r1.a,&r1.b,&r1.c);
scanf("%d %d %d",&r2.a,&r2.b,&r2.c);
if(r1.a == 0 && r1.b == 0 && r1.c == 0)
if(r2.a == 0 && r2.b == 0 && r2.c == 0)
break;
Da = r1.a*r2.b - r2.a*r1.b;
Dx = r1.c*r2.b - r2.c*r1.b;
Dy = r1.a*r2.c - r2.a*r1.c;
if(Da != 0)
printf("The fixed point is at %.2f %.2f.\n",(float)Dx/Da,(float)Dy/Da);
else
puts("No fixed point exists.");
}
}