Skip to content

Commit

Permalink
Create Compare_the_Triplets.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
art-rauniyar authored Oct 30, 2022
1 parent d014190 commit 39ec204
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions C#/Compare_the_Triplets.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;

class triplets
{
static void Main()
{
int a_sum=0,b_sum=0;
int[] a = new int[3];
int[] b = new int[3];

for(int i=0; i<3; i++){
a[i] = Convert.ToInt32(Console.ReadLine());
}
for(int i=0; i<3; i++){
b[i] = Convert.ToInt32(Console.ReadLine());
}
for(int i=0; i<3; i++){
if(a[i]>b[i]){
a_sum+=1;
}
else if(a[i]<b[i]){
b_sum+=1;
}
}
Console.Write("{0} ", a_sum);
Console.Write("{0}", b_sum);
}
}

0 comments on commit 39ec204

Please sign in to comment.