Advertisement
Guest User

Untitled

a guest
Mar 25th, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Code_Coach_Challenge
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string[] words = {
  10. "home",
  11. "programming",
  12. "victory",
  13. "C#",
  14. "football",
  15. "sport",
  16. "book",
  17. "learn",
  18. "dream",
  19. "fun"
  20. };
  21. string letter = Console.ReadLine();
  22.  
  23. bool f=false;
  24. for(int count=0;count<10;count++){
  25. if(words[count].Contains(letter)){
  26. Console.WriteLine(words[count]);
  27. f=true;
  28. }
  29. }
  30. if(!f)
  31. Console.WriteLine("No mach");
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement