Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.IO;
  7.  
  8. namespace ConsoleApp1
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14.  
  15. string line;
  16. string file = "szotar.txt";
  17. StreamReader read = new StreamReader(file);
  18.  
  19. Console.WriteLine("?");
  20. string word = Console.ReadLine();
  21.  
  22. while (!read.EndOfStream) {
  23.  
  24. line = read.ReadLine();
  25.  
  26. if (word == line) {
  27.  
  28. Console.WriteLine("(A szó helyes");
  29. }
  30.  
  31. else {
  32.  
  33. Console.WriteLine("A szó helytelen");
  34. }
  35. }
  36.  
  37.  
  38. read.Close();
  39. Console.ReadLine();
  40.  
  41.  
  42.  
  43.  
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement