Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _03.CompareCharArrays
- {
- class CompareCharArrays
- {
- static void Main(string[] args)
- {
- char[] chars1 = Console.ReadLine().ToCharArray();
- char[] chars2 = Console.ReadLine().ToCharArray();
- int minLength = Math.Min(chars1.Length, chars2.Length);
- int sum1 = 0;
- int sum2 = 0;
- foreach (var item in chars1)
- {
- sum1 += item;
- }
- foreach (var item in chars2)
- {
- sum2 += item;
- }
- if (sum1 > sum2)
- {
- Console.WriteLine(">");
- }
- else if (sum1 < sum2)
- {
- Console.WriteLine("<");
- }
- else
- {
- Console.WriteLine("=");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement