From 6180a112b0fa7f388d0b7934483256065b49b5dc Mon Sep 17 00:00:00 2001 From: rajni0606 <56886405+rajni0606@users.noreply.github.com> Date: Sat, 31 Oct 2020 19:58:17 +0530 Subject: [PATCH] ComparingTriplets Program to compare 2 sets of triplets --- Comparingtriplets | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Comparingtriplets diff --git a/Comparingtriplets b/Comparingtriplets new file mode 100644 index 00000000..3a1f130a --- /dev/null +++ b/Comparingtriplets @@ -0,0 +1,21 @@ +#include +using namespace std; +int *compareTriplets() +{ + static int c[2]; + int a[3],b[3]; + for(int i=0;i<3;i++)cin>>a[i]; + for(int j=0;j<3;j++)cin>>b[j]; + for(int k=0;k<3;k++) + { + if(a[k]>b[k])c[0]++; + else if(a[k]