fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text.RegularExpressions;
  6.  
  7. public class Test
  8. {
  9. public static void Main()
  10. {
  11. var strs = new List<string> { "PassWord", "PAssword", "PASSWord"};
  12. var n = 2;
  13. foreach (var s in strs) {
  14. var res = s.Where(c => (c >= 65 && c <= 90)).Count();
  15. Console.WriteLine("{0}: {1}", s, res == 2);
  16. }
  17. }
  18. }
Success #stdin #stdout 0s 131776KB
stdin
Standard input is empty
stdout
PassWord: True
PAssword: True
PASSWord: False