Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Rextester.Program.Main is the entry point for your code. Don't change it.
- //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text.RegularExpressions;
- namespace Rextester
- {
- public class Program
- {
- public static void Main(string[] args)
- {
- string a, b, c;
- Console.Write("Line 1: ");
- a = Console.ReadLine();
- Console.Write("Line 2: ");
- b = Console.ReadLine();
- Console.Write("Line 3: ");
- c = Console.ReadLine();
- if (char.IsLetter(a[a.Length - 1]) && char.IsLetter(b[b.Length - 1]) && char.IsLetter(c[c.Length - 1]))
- {
- Console.WriteLine("Every line ends with letter");
- }
- else
- {
- Console.WriteLine("Not every line ends with letter");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment