-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path21.c
49 lines (42 loc) · 760 Bytes
/
21.c
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
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <stdio.h>
int main()
{
int arr1[100];
int arr2[100];
int as=0, bs=0;
int lw=0;
int i;
for(i=0; i<10; i++){
scanf("%d", &arr1[i]);
}
for(i=0; i<10; i++){
scanf("%d", &arr2[i]);
}
for(i=0; i<10; i++){
if(arr1[i]>arr2[i]){
as=as+3;
lw=1;
}
else if(arr1[i]<arr2[i]){
bs=bs+3;
lw=2;
}
else if(arr1[i]==arr2[i]){
as++;
bs++;
}
}
printf("%d %d \n", as, bs);
if(as==bs){
if(lw==0){
printf("D \n");
}
}
else if(lw==1){
printf("A \n");
}
else{
printf("B \n");
}
return 0;
}