-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathL4_7.c
More file actions
35 lines (32 loc) · 834 Bytes
/
Copy pathL4_7.c
File metadata and controls
35 lines (32 loc) · 834 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
#include <stdio.h>
#include <stdlib.h>
typedef struct tpontos{
int x1;
int y1;
int x2;
int y2;
} tReta;
int main(){
tReta reta;
int n, i = 1;
scanf("%d", &n);
for ( i; i <= n; i++){
scanf("%d %d %d %d", &reta.x1, &reta.y1, &reta.x2, &reta.y2);
if (reta.x1 == 0 || reta.x2 == 0 || reta.y1 == 0 || reta.y2 == 0){
printf("DIFERENTE\n");
continue;
}
if(reta.x1 > 0 && reta.x2 > 0 && reta.y1 > 0 && reta.y2 > 0){
printf("MESMO\n");
}else if(reta.x1 < 0 && reta.x2 < 0 && reta.y1 > 0 && reta.y2 > 0){
printf("MESMO\n");
}else if(reta.x1 < 0 && reta.x2 < 0 && reta.y1 < 0 && reta.y2 < 0){
printf("MESMO\n");
}else if(reta.x1 > 0 && reta.x2 > 0 && reta.y1 < 0 && reta.y2 < 0){
printf("MESMO\n");
}else{
printf("DIFERENTE\n");
}
}
return 0;
}