Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #142 from art-rauniyar/main
Browse files Browse the repository at this point in the history
Create Compare_the_Triplets.cs
  • Loading branch information
thekavikumar authored Oct 30, 2022
2 parents 50773b7 + 39ec204 commit b5f9840
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 b5f9840

Please sign in to comment.