Advertisement
Guest User

Untitled

a guest
Sep 12th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 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 awal = "qwertyuioplkjhgfdsazxcvbnm";
  16. char[] awalChars = awal.ToCharArray();
  17. string hasil = "";
  18. string kal = "aD4_3an9X-B15a+13@#4_!Ni3eE?!?!";
  19. char[] kalChar = kal.ToCharArray();
  20.  
  21. for (int i = 0; i < kal.Length; i++){
  22. if (awal.IndexOf(kalChar[i]) > 0){
  23. hasil = hasil + kalChar[i];
  24. }
  25. }
  26. //Your code goes here
  27. Console.WriteLine(hasil);
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement