-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscore-comparator.cpp
More file actions
60 lines (57 loc) · 1001 Bytes
/
score-comparator.cpp
File metadata and controls
60 lines (57 loc) · 1001 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a_score=0 , b_score=0;
int a[3] , b[3];
cout << "ALIX turn : " << endl;
for(int i=0; i<3 ; i++){
cin >> a[i];
cout << a[i]<< endl;
}
cout << "BOUB turn :" << endl;
for(int j=0 ; j<3; j++){
if( j<=100){
cin >> b[j];
cout << b[j] << endl;
}
else{
cout << "the max is 100" << endl;
}
}
if(a[0] > b[0]){
a_score= 1+a_score ;
}
else if(a[0] ==b[0]){
a_score +=0;
b_score +=0;
}
else if(a[0] < b[0]){
b_score= 1+b_score ;
}
// round two;
if(a[1] > b[1]){
a_score= 1+a_score;
}
else if(a[1]== b[1]){
a_score +=0;
b_score +=0;
}
else if(a[1] < b[1]){
b_score= 1+b_score ;
}
if(a[2] > b[2]){
a_score= 1+a_score;
}
else if(a[2]== b[2]){
a_score +=0;
b_score +=0;
}
else if(a[2] < b[2]){
b_score= 1+b_score ;
}
cout <<"|" <<a_score << ":" ;
cout << b_score<< "|" ;
return 0;
}