Skip to content

Commit

Permalink
Solved cognizance-amrita#66 in C++
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhangNarain committed Oct 20, 2022
1 parent 2720a35 commit eb6098a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions c++/Compare-The-Triplets.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include<bits/stdc++.h>
using namespace std;

int main(){
int a[3],b[3];
for(int i=0;i<3;i++) cin>>a[i];
for(int i=0;i<3;i++) cin>>b[i];
int alice=0,bob=0;
for(int i=0;i<3;i++){
if(a[i]==b[i]) continue;

if(a[i]>b[i]) alice++;
else bob++;
}

cout<<alice<<" "<<bob<<endl;
}

0 comments on commit eb6098a

Please sign in to comment.