Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- using System.Text;
- namespace AsciiSumator
- {
- class Program
- {
- static void Main()
- {
- char first = char.Parse(Console.ReadLine());
- char last = char.Parse(Console.ReadLine());
- var sum = Console.ReadLine()
- .ToCharArray()
- .Where(x => x > first && x < last)
- .Sum(x => x);
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement