ChocoBit

Untitled

Oct 9th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. //Rextester.Program.Main is the entry point for your code. Don't change it.
  2. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5
  3.  
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text.RegularExpressions;
  8.  
  9. namespace Rextester
  10. {
  11.     public class Program
  12.     {
  13.         public static void Main(string[] args)
  14.         {
  15.             string a, b, c;
  16.             Console.Write("Line 1: ");
  17.             a = Console.ReadLine();
  18.             Console.Write("Line 2: ");
  19.             b = Console.ReadLine();
  20.             Console.Write("Line 3: ");
  21.             c = Console.ReadLine();
  22.  
  23.             if (char.IsLetter(a[a.Length - 1]) && char.IsLetter(b[b.Length - 1]) && char.IsLetter(c[c.Length - 1]))
  24.             {
  25.                 Console.WriteLine("Every line ends with letter");
  26.             }
  27.             else
  28.             {
  29.                 Console.WriteLine("Not every line ends with letter");
  30.             }
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment